Skip to content

Commit

Permalink
Merge pull request #131 from GW2Treasures/feature/ci-phar-archive
Browse files Browse the repository at this point in the history
  • Loading branch information
darthmaim authored May 10, 2023
2 parents dfe744f + 8c0a3bc commit 17306b3
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches: [ "master" ]
pull_request:
merge_group:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
Expand Down Expand Up @@ -33,10 +33,10 @@ jobs:
include:
- php: '7.2'
phar: true

steps:
- uses: actions/checkout@v3

- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
Expand All @@ -61,19 +61,19 @@ jobs:

- name: Install dependencies
run: composer install --prefer-dist --no-progress

- name: Build phar
if: matrix.phar
run: php build/build.php

- name: Run Tests
if: matrix.phar == false
run: vendor/bin/phpunit --configuration phpunit.xml --coverage-clover clover.xml

- name: Run Tests (phar)
if: matrix.phar
run: vendor/bin/phpunit --configuration phpunit.xml --bootstrap build/autoload.php

- name: Download base coverage
uses: dawidd6/action-download-artifact@v2
if: github.event_name == 'pull_request' && matrix.phar == false
Expand All @@ -100,6 +100,15 @@ jobs:
name: coverage-${{ matrix.php }}
path: ./clover.xml

- name: Upload phar
uses: actions/upload-artifact@v3
if: matrix.phar
with:
name: phar
path: |
./build/artifacts/gw2api.phar
./build/artifacts/gw2api.zip
success:
name: Success
needs: [build]
Expand Down

0 comments on commit 17306b3

Please sign in to comment.