-
Notifications
You must be signed in to change notification settings - Fork 59
42 lines (42 loc) · 1.39 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: Test & build
on: [pull_request]
jobs:
main:
runs-on: ubuntu-22.04
steps:
- run: |
wget -q https://packages.erlang-solutions.com/erlang/debian/pool/esl-erlang_25.0.4-1~ubuntu~jammy_amd64.deb
sudo apt install --allow-downgrades ./esl-erlang_25.0.4-1~ubuntu~jammy_amd64.deb
- uses: actions/checkout@v3
with:
fetch-depth: 100
- uses: actions/setup-node@v3
with:
node-version: 18.x
- uses: actions/cache@v3
with:
path: |
~/.npm
~/.autorest
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
- run: npm ci
- name: Run Commitlint
if: github.event_name == 'pull_request'
env:
HEAD: ${{ github.event.pull_request.head.sha }}
BASE: ${{ github.event.pull_request.base.sha }}
run: npx commitlint --from $BASE --to $HEAD --verbose
- run: npm run lint
- run: docker-compose up -d
- name: Ensure that node is running
run: |
while [[ `curl -s -o /dev/null -w %{http_code} localhost:3013/api` != 200 ]]; do
sleep 0.2;
done
- run: npx nyc npm run test
- run: npx nyc report --reporter=text-lcov > coverage.lcov
- uses: codecov/codecov-action@v3
with:
files: coverage.lcov
- run: docker-compose logs
if: always()