-
-
Notifications
You must be signed in to change notification settings - Fork 11
71 lines (67 loc) · 1.86 KB
/
ci.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: Pull Request Pipeline
on:
pull_request:
# push:
# branches:
# - main # Push events on master branch
jobs:
# https://github.com/chef/github-workflows/blob/main/.github/workflows/yaml-lint.yml
yaml-lint:
uses: ./.github/workflows/yaml-lint.yml
build:
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v1
- name: Read .nvmrc
run: echo "##[set-output name=NVMRC;]$(cat .nvmrc)"
id: nvm
- uses: actions/setup-node@v1
with:
node-version: "${{ steps.nvm.outputs.NVMRC }}"
- name: Checkout repository
uses: actions/checkout@v3
- run: npm install --dev
- run: npm run test:coverage
- name: upload junit
uses: actions/upload-artifact@v1
with:
name: junit
path: junit.xml
- uses: ashley-taylor/[email protected]
if: always()
with:
access-token: ${{ secrets.GITHUB_TOKEN }}
path: junit.xml
- name: upload code coverage
uses: actions/upload-artifact@v1
with:
name: Report-CodeCoverage
path: coverage
- run: npm install -g markdownlint-cli
- run: markdownlint src --disable MD001 MD013 MD033 MD045 MD026 MD041
- run: npm run build
- name: build _site
run: |
npm run build
# - name: upload _site
# uses: actions/upload-artifact@v1
# with:
# name: _site
# path: _site
pr-check:
if: always()
needs:
- yaml-lint
- build
runs-on: Ubuntu-latest
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@main
with:
# allowed-failures: markdown-link-checker
allowed-skips:
jobs: ${{ toJSON(needs) }}