diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 000000000..7cd1db1f3 --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,22 @@ +name: Run tests + +on: + pull_request: + push: + branches: + - main + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - uses: cachix/install-nix-action@v26 + with: + nix_path: nixpkgs=channel:nixos-unstable + + - uses: actions/checkout@v4 + + - run: | + nix develop -c composer install + nix develop -c ./run test diff --git a/run.local b/run.local index dcbd163e6..1dd224428 100755 --- a/run.local +++ b/run.local @@ -82,4 +82,8 @@ function publish { git stash pop } +function test { + ./vendor/bin/phpunit "${@}" +} + # vim: ft=bash