From 94415f04bab452c9a9cdbab3644359db27cdb55f Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Fri, 3 May 2024 15:21:56 +0100 Subject: [PATCH] Add GitHub Actions CI configuration --- .github/workflows/test.yaml | 22 ++++++++++++++++++++++ run.local | 4 ++++ 2 files changed, 26 insertions(+) create mode 100644 .github/workflows/test.yaml diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 00000000..7cd1db1f --- /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 dcbd163e..1dd22442 100755 --- a/run.local +++ b/run.local @@ -82,4 +82,8 @@ function publish { git stash pop } +function test { + ./vendor/bin/phpunit "${@}" +} + # vim: ft=bash