Skip to content

Commit

Permalink
ci
Browse files Browse the repository at this point in the history
  • Loading branch information
staudenmeir committed Jan 26, 2024
1 parent 4315074 commit 64bbf89
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ jobs:
steps:
- uses: actions/checkout@v4
- run: echo "TAG=${{ hashFiles(format('.docker/php{0}.Dockerfile', matrix.php)) }}" >> $GITHUB_ENV
- run: echo ${{ env.TAG }}
- uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
Expand All @@ -30,28 +29,28 @@ jobs:
- run: |
docker pull ${{ env.REGISTRY }}/${{ github.actor }}/belongs-to-through/php${{ matrix.php }}:${{ env.TAG }}
continue-on-error: true
env:
TAG: ${{ hashFiles(format('.docker/php{0}.Dockerfile', matrix.php)) }}
# env:
# TAG: ${{ hashFiles(format('.docker/php{0}.Dockerfile', matrix.php)) }}
id: pull
- run: |
docker compose build php${{ matrix.php }}
docker tag belongs-to-through-php${{ matrix.php }} ${{ env.REGISTRY }}/${{ github.actor }}/belongs-to-through/php${{ matrix.php }}:${{ env.TAG }}
docker push ${{ env.REGISTRY }}/${{ github.actor }}/belongs-to-through/php${{ matrix.php }}:${{ env.TAG }}
env:
TAG: ${{ hashFiles(format('.docker/php{0}.Dockerfile', matrix.php)) }}
# env:
# TAG: ${{ hashFiles(format('.docker/php{0}.Dockerfile', matrix.php)) }}
if: steps.pull.outcome != 'success'
- uses: actions/cache@v3
with:
path: ~/.cache/composer/files
key: php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
- run: docker compose -f docker-compose.ci.yml run --rm php${{ matrix.php }} composer update --no-interaction --no-progress --prefer-dist --prefer-${{ matrix.release }}
env:
TAG: ${{ hashFiles(format('.docker/php{0}.Dockerfile', matrix.php)) }}
# env:
# TAG: ${{ hashFiles(format('.docker/php{0}.Dockerfile', matrix.php)) }}
- run: |
PHPUNIT_FLAGS=$([ "${{ matrix.coverage }}" == "xdebug" ] && echo "--coverage-clover=coverage.xml" || echo "")
docker compose -f docker-compose.ci.yml run --rm php${{ matrix.php }} vendor/bin/phpunit $PHPUNIT_FLAGS
env:
TAG: ${{ hashFiles(format('.docker/php{0}.Dockerfile', matrix.php)) }}
# env:
# TAG: ${{ hashFiles(format('.docker/php{0}.Dockerfile', matrix.php)) }}
- uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
Expand Down

0 comments on commit 64bbf89

Please sign in to comment.