diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..74dcdb5 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,17 @@ +name: Test + +on: + - push + - pull_request + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2.4.0 + - uses: cachix/install-nix-action@v15 + with: + nix_path: nixpkgs=channel:nixos-unstable + - run: | + nix-shell --run 'npm install' + nix-shell --run 'make lint' diff --git a/Makefile b/Makefile index 5b3b331..b515da1 100644 --- a/Makefile +++ b/Makefile @@ -13,3 +13,4 @@ publish: lint: ./node_modules/.bin/prettier --check web/src ./node_modules/.bin/eslint web/src --ext .js,.jsx,.ts,.tsx + test -z $$(gofmt -l .)