2021-02-17 06:20:23 +08:00
|
|
|
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
|
2021-03-23 05:16:38 +08:00
|
|
|
- name: Check formatting
|
|
|
|
run: mix format --check-formatted
|
2021-02-17 06:20:23 +08:00
|
|
|
- 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
|
2021-03-23 05:16:38 +08:00
|
|
|
- name: Check assets formatting
|
|
|
|
run: npm run format-check --prefix assets
|
|
|
|
- name: Run assets tests
|
2021-02-17 06:20:23 +08:00
|
|
|
run: npm test --prefix assets
|