Added test stage to ci

This commit is contained in:
netkas 2024-09-17 14:21:28 -04:00
parent 414fd0a781
commit 385000907e

View file

@ -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: