Create test.yml
This commit is contained in:
parent
1c3988206e
commit
276aec0df6
1 changed files with 50 additions and 0 deletions
50
.github/workflows/test.yml
vendored
Normal file
50
.github/workflows/test.yml
vendored
Normal file
|
@ -0,0 +1,50 @@
|
||||||
|
name: Build and Test
|
||||||
|
|
||||||
|
on: [push, pull_request]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Use NCC Workflow
|
||||||
|
uses: nosial/ncc-workflow/.github/workflows/build.yml@main
|
||||||
|
with:
|
||||||
|
ncc_package_path: build/release/net.nosial.configlib.ncc
|
||||||
|
|
||||||
|
- name: Build project
|
||||||
|
run: |
|
||||||
|
ncc build --config release --log-level debug
|
||||||
|
|
||||||
|
- name: Upload build artifacts
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: ncc-build
|
||||||
|
path: build/release/net.nosial.configlib.ncc
|
||||||
|
|
||||||
|
test:
|
||||||
|
needs: build
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Download build artifacts
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: ncc-build
|
||||||
|
path: ncc-build
|
||||||
|
|
||||||
|
- name: Use NCC Workflow
|
||||||
|
uses: nosial/ncc-workflow/.github/workflows/build.yml@main
|
||||||
|
with:
|
||||||
|
ncc_package_path: ncc-build/net.nosial.configlib.ncc
|
||||||
|
|
||||||
|
- name: Run PHPUnit tests
|
||||||
|
run: |
|
||||||
|
wget https://phar.phpunit.de/phpunit-11.3.phar
|
||||||
|
php phpunit-11.3.phar --configuration phpunit.xml
|
Loading…
Add table
Reference in a new issue