Set up CI

This commit is contained in:
Jonatan Kłosko 2021-02-16 23:20:23 +01:00
parent 6ac7f94897
commit f2f121a63b
2 changed files with 30 additions and 1 deletions

28
.github/workflows/test.yaml vendored Normal file
View file

@ -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

View file

@ -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",