diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..17085b9 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,24 @@ +name: CI + +on: + push: + branches: + - main + paths-ignore: + - "README.md" + schedule: + - cron: "0 12 15 * *" + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4 + + - uses: cachix/install-nix-action@6ed004b9ccb68dbc28e7c85bee15fa93dbd214ac # v22 + with: + nix_path: nixpkgs=channel:nixos-23.05 + + - run: | + ./run ci:test diff --git a/run b/run index 3aad137..6e37c92 100755 --- a/run +++ b/run @@ -32,6 +32,11 @@ function build { # TODO: build a Nix derivation and add it to the store. } +function ci:test { + nix develop --command composer install + nix develop --command phpunit +} + # Display a list of all available commands. function help { printf "%s [args]\n\nTasks:\n" "${0}"