Skip to content

Commit

Permalink
:octocat: CI update
Browse files Browse the repository at this point in the history
  • Loading branch information
codemasher committed Mar 21, 2024
1 parent d27812c commit 20e10a3
Showing 1 changed file with 17 additions and 10 deletions.
27 changes: 17 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,19 @@
# https://github.com/sebastianbergmann/phpunit/blob/master/.github/workflows/ci.yml

on:
- pull_request
- push
push:
branches:
- main
pull_request:
branches:
- main

name: "Continuous Integration"

jobs:

static-code-analysis:
name: "Static Code Analysis"

runs-on: ubuntu-latest

env:
Expand All @@ -20,7 +23,7 @@ jobs:

steps:
- name: "Checkout"
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: "Install PHP"
uses: shivammathur/setup-php@v2
Expand All @@ -30,15 +33,16 @@ jobs:
coverage: none
extensions: ast, imagick, json

- name: "Update dependencies with composer"
run: composer update --no-interaction --no-ansi --no-progress --no-suggest
- name: "Install dependencies with composer"
uses: ramsey/composer-install@v3

- name: "Run phan"
run: php vendor/bin/phan


tests:
name: "Unit Tests"

needs: static-code-analysis
runs-on: ${{ matrix.os }}

strategy:
Expand All @@ -50,10 +54,13 @@ jobs:
php-version:
- "7.4"
- "8.0"
- "8.1"
- "8.2"
- "8.3"

steps:
- name: "Checkout"
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: "Install PHP with extensions"
uses: shivammathur/setup-php@v2
Expand All @@ -64,12 +71,12 @@ jobs:
extensions: imagick, json

- name: "Install dependencies with composer"
run: composer update --no-ansi --no-interaction --no-progress --no-suggest
uses: ramsey/composer-install@v3

- name: "Run tests with phpunit"
run: php vendor/phpunit/phpunit/phpunit --configuration=phpunit.xml

- name: "Send code coverage report to Codecov.io"
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}

0 comments on commit 20e10a3

Please sign in to comment.