-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #37 from utopia-php/feat-github-action
move tests to github action
- Loading branch information
Showing
10 changed files
with
217 additions
and
108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: "CodeQL" | ||
|
||
on: [pull_request] | ||
jobs: | ||
lint: | ||
name: CodeQL | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 2 | ||
|
||
- run: git checkout HEAD^2 | ||
|
||
- name: Run CodeQL | ||
run: | | ||
docker run --rm -v $PWD:/app composer sh -c \ | ||
"composer install --profile --ignore-platform-reqs && composer check" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: "Tests" | ||
|
||
on: [pull_request] | ||
jobs: | ||
lint: | ||
name: Tests ${{ matrix.php-versions }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
php-versions: ['8.1', '8.2', '8.3', 'nightly'] | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup PHP ${{ matrix.php-versions }} | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-versions }} | ||
|
||
- name: Validate composer.json and composer.lock | ||
run: composer validate --strict | ||
|
||
- name: Compose install | ||
run: composer install --ignore-platform-reqs | ||
|
||
- name: Run tests | ||
run: | | ||
export OPENSRS_KEY=${{ secrets.OPENSRS_KEY }} | ||
export OPENSRS_USERNAME=${{ secrets.OPENSRS_USERNAME }} | ||
composer test |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.