-
Notifications
You must be signed in to change notification settings - Fork 32
52 lines (46 loc) · 1.28 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
43
44
45
46
47
48
49
50
51
52
name: CI
on:
push:
branches:
- 'main'
- 'development'
pull_request:
branches:
- 'main'
- 'development'
workflow_dispatch:
jobs:
build:
name: Build, lint, and test on Node 18.12.1 and ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ macOS-latest, ubuntu-latest]
steps:
- name: Checkout repo
uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '18.12.1'
cache: 'npm'
- name: build
run: |
npm cache clean --force
npm set registry https://registry.npmjs.org/
npm i
npm test -- --coverage=true
npm run build
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: Commit files
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git commit -a -m "Update documentation"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}