diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 000000000..cf4cc4d04 --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,28 @@ +name: Test +on: + pull_request: + push: + branches: + - main +jobs: + main: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Install Erlang & Elixir + uses: erlef/setup-elixir@v1 + with: + otp-version: '23.2' + elixir-version: '1.11.3' + - name: Install mix dependencies + run: mix deps.get + - name: Run tests + run: mix test + - name: Install Node + uses: actions/setup-node@v2 + with: + node-version: '14.x' + - name: Install npm dependencies + run: npm ci --prefix assets + - name: Run tests + run: npm test --prefix assets diff --git a/assets/package.json b/assets/package.json index 08497ae82..84b0a1cb7 100644 --- a/assets/package.json +++ b/assets/package.json @@ -6,7 +6,8 @@ "deploy": "NODE_ENV=production webpack --mode production", "watch": "webpack --mode development --watch", "format": "prettier --trailing-comma es5 --write {js,test,css}/**/*.{js,json,css,scss,md}", - "test": "jest --watch" + "test": "jest", + "test:watch": "jest" }, "dependencies": { "marked": "^1.2.8",