@@ -16,15 +16,63 @@ jobs:
1616 - name : Setup node
1717 uses : actions/setup-node@v2.1.1
1818 with :
19- node-version : 12
19+ node-version : 14
2020 - name : Install project
2121 run : npm ci --ignore-scripts
2222 - name : Lint
2323 run : npm run lint-es
2424 - name : Check formatting
2525 run : npm run format:check
26+ build :
27+ runs-on : ubuntu-latest
28+ timeout-minutes : 5
29+ steps :
30+ - name : Checkout
31+ uses : actions/checkout@v2.3.2
32+ - name : Setup node
33+ uses : actions/setup-node@v2.1.1
34+ with :
35+ node-version : 14
36+ - name : Install project
37+ run : npm ci --ignore-scripts
38+ - name : Build
39+ run : npm run build
40+ test :
41+ runs-on : ubuntu-latest
42+ timeout-minutes : 5
43+ steps :
44+ - name : Checkout
45+ uses : actions/checkout@v2.3.2
46+ - name : Setup node
47+ uses : actions/setup-node@v2.1.1
48+ with :
49+ node-version : 14
50+ - name : Install project
51+ run : npm ci --ignore-scripts
52+ - name : Test
53+ run : npm run test:ci
54+ code-coverage :
55+ needs : [lint, build, test]
56+ runs-on : ubuntu-latest
57+ timeout-minutes : 5
58+ steps :
59+ - name : Checkout
60+ uses : actions/checkout@v2.3.2
61+ - name : Setup node
62+ uses : actions/setup-node@v2.1.1
63+ with :
64+ node-version : 14
65+ - name : Install project
66+ run : npm ci --ignore-scripts
67+ - name : Test
68+ run : npm run test:ci
69+ - name : Upload coverage to Codecov
70+ uses : codecov/codecov-action@v1.0.10
71+ with :
72+ token : ${{ secrets.CODECOV_TOKEN }}
73+ file : ./coverage/cobertura-coverage.xml
2674 release :
27- needs : lint
75+ needs : [ lint, build, test, code-coverage]
2876 runs-on : ubuntu-latest
2977 # GitHub API requests can easy take a couple of seconds and the release can
3078 # make lots of API requests when a release has a lot of commits. If every
@@ -40,14 +88,17 @@ jobs:
4088 - name : Setup node
4189 uses : actions/setup-node@v2.1.1
4290 with :
43- node-version : 12
91+ node-version : 14
4492 - name : Install project
4593 run : npm ci --ignore-scripts
94+ - name : Build
95+ run : npm run build
4696 - name : Release
4797 env :
4898 GITHUB_TOKEN : ${{ secrets.SEMANTIC_RELEASE_GITHUB_TOKEN }}
4999 GIT_AUTHOR_NAME : vidavidorra-release
50100 GIT_AUTHOR_EMAIL : 65564857+vidavidorra-release@users.noreply.github.com
51101 GIT_COMMITTER_NAME : vidavidorra-release
52102 GIT_COMMITTER_EMAIL : 65564857+vidavidorra-release@users.noreply.github.com
103+ NPM_TOKEN : ${{ secrets.NPM_PUBLISH_TOKEN }}
53104 run : npx --no-install semantic-release
0 commit comments