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 64bbf89 commit 196f227
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:

steps:
- uses: actions/checkout@v4
- run: echo ${{ github.event.repository.name }}
- run: echo "TAG=${{ hashFiles(format('.docker/php{0}.Dockerfile', matrix.php)) }}" >> $GITHUB_ENV
- uses: docker/login-action@v3
with:
Expand All @@ -29,28 +30,20 @@ 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)) }}
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)) }}
if: steps.pull.outcome != 'success'
- uses: actions/cache@v3
- uses: actions/cache@v4
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)) }}
- 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)) }}
- uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
Expand Down

0 comments on commit 196f227

Please sign in to comment.