11name : Test & build
2- on : [pull_request]
2+ on :
3+ push :
4+ branches : [master, develop]
5+ pull_request :
36jobs :
47 main :
58 runs-on : ubuntu-22.04
69 steps :
710 - run : |
811 wget -q https://packages.erlang-solutions.com/erlang/debian/pool/esl-erlang_25.0.4-1~ubuntu~jammy_amd64.deb
912 sudo apt install --allow-downgrades ./esl-erlang_25.0.4-1~ubuntu~jammy_amd64.deb
10- - uses : actions/checkout@v3
13+ - uses : actions/checkout@v4
1114 with :
1215 fetch-depth : 100
13- - uses : actions/setup-node@v3
16+ - uses : actions/setup-node@v4
1417 with :
15- node-version : 18 .x
16- - uses : actions/cache@v3
18+ node-version : 20 .x
19+ - uses : actions/cache@v4
1720 with :
1821 path : |
1922 ~/.npm
@@ -27,16 +30,15 @@ jobs:
2730 BASE : ${{ github.event.pull_request.base.sha }}
2831 run : npx commitlint --from $BASE --to $HEAD --verbose
2932 - run : npm run lint
30- - run : docker-compose up -d
31- - name : Ensure that node is running
32- run : |
33- while [[ `curl -s -o /dev/null -w %{http_code} localhost:3013/api` != 200 ]]; do
34- sleep 0.2;
35- done
36- - run : npx nyc npm run test
33+ # TODO: remove after merging https://github.com/aeternity/aeternity/pull/4319
34+ - run : chmod 666 ./docker/accounts-pub.json
35+ - run : docker compose up -d --wait
36+ - run : npx nyc npm test
3737 - run : npx nyc report --reporter=text-lcov > coverage.lcov
38- - uses : codecov/codecov-action@v3
38+ - uses : codecov/codecov-action@v4
3939 with :
4040 files : coverage.lcov
41- - run : docker-compose logs
41+ env :
42+ CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
43+ - run : docker compose logs
4244 if : always()
0 commit comments