name: Run tests

on:
  push:
    branches:
    - master

    tags:
    - '*'

  pull_request:

jobs:
  test:
    strategy:
      matrix:
        drupal_ver: [ 9,8,7 ]
        php_ver: [ '8.0','7.4','7.3' ]
        exclude:
        - drupal_ver: 8
          php_ver: '8.0'
        - drupal_ver: 7
          php_ver: '8.0'
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - name: test
      env:
        DRUPAL_VER: ${{ matrix.drupal_ver }}
        PHP_VER: ${{ matrix.php_ver }}
      run: make test
  release:
    runs-on: ubuntu-latest
    if: startsWith(github.ref, 'refs/tags/')
    needs: test
    steps:
    - uses: actions/checkout@v2
    - name: prepare artifact
      run: cp docker.mk Makefile && tar -czf docker4drupal.tar.gz docker-compose.yml docker-compose.override.yml mutagen Makefile .env traefik.yml
    - name: get tag name
      id: vars
      run: echo ::set-output name=tag::${GITHUB_REF#refs/*/}
    - uses: xresloader/upload-to-github-release@v1
      id: upload_artifact
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      with:
        file: docker4drupal.tar.gz
        overwrite: true
        tags: true
        draft: false
        tag_name: ${{ steps.vars.outputs.tag }}
name: Run tests

on:
  push:
    branches:
    - master

    tags:
    - '*'

  pull_request:

jobs:
  test:
    strategy:
      matrix:
        drupal_ver: [ 9,8,7 ]
        php_ver: [ '8.0','7.4','7.3' ]
        exclude:
        - drupal_ver: 8
          php_ver: '8.0'
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - name: test
      env:
        DRUPAL_VER: ${{ matrix.drupal_ver }}
        PHP_VER: ${{ matrix.php_ver }}
      run: make test
  release:
    runs-on: ubuntu-latest
    if: startsWith(github.ref, 'refs/tags/')
    needs: test
    steps:
    - uses: actions/checkout@v2
    - name: prepare artifact
      run: cp docker.mk Makefile && tar -czf docker4drupal.tar.gz docker-compose.yml docker-compose.override.yml mutagen Makefile .env traefik.yml
    - name: get tag name
      id: vars
      run: echo ::set-output name=tag::${GITHUB_REF#refs/*/}
    - uses: xresloader/upload-to-github-release@v1
      id: upload_artifact
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      with:
        file: docker4drupal.tar.gz
        overwrite: true
        tags: true
        draft: false
        tag_name: ${{ steps.vars.outputs.tag }}
Test php 8.0 for drupal 7
Test php 8.0 for drupal 7
