Added test stage to ci
This commit is contained in:
parent
414fd0a781
commit
385000907e
1 changed files with 29 additions and 2 deletions
31
.github/workflows/ci.yml
vendored
31
.github/workflows/ci.yml
vendored
|
@ -41,7 +41,6 @@ jobs:
|
|||
git clone https://git.n64.cc/nosial/ncc.git
|
||||
cd ncc
|
||||
make redist
|
||||
# Find the dynamically generated NCC directory
|
||||
NCC_DIR=$(find build/ -type d -name "ncc_*" | head -n 1)
|
||||
if [ -z "$NCC_DIR" ]; then
|
||||
echo "NCC build directory not found"
|
||||
|
@ -60,8 +59,36 @@ jobs:
|
|||
name: ncc-build
|
||||
path: build/release/net.nosial.configlib.ncc
|
||||
|
||||
release:
|
||||
test:
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: php:8.3
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Download build artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: ncc-build
|
||||
path: build/release/net.nosial.configlib.ncc
|
||||
|
||||
- name: Install NCC package
|
||||
run: |
|
||||
ncc package install --package="build/release/net.nosial.configlib.ncc" --skip-dependencies --reinstall -y --log-level
|
||||
|
||||
- name: Install project dependencies
|
||||
run: |
|
||||
composer install
|
||||
|
||||
- name: Run PHPUnit tests
|
||||
run: |
|
||||
./vendor/bin/phpunit --configuration phpunit.xml
|
||||
|
||||
release:
|
||||
needs: [build, test]
|
||||
permissions: write-all
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
|
|
Loading…
Add table
Reference in a new issue