diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a0f591b..2b6c8fd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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: