Skip to content

Commit ccb20eb

Browse files
authored
use github actions (#4035)
* use github actions * update ci * fix typo * update yarn command * cache node_modules * use node 12 * enable Proselint * fix syntax * use python 3.6 * update ci * cache pip * update yarn cache * update travis * Revert "update travis" This reverts commit d6957f0. * install python3-proselint * Revert "install python3-proselint" This reverts commit d0e915f. * add time to debug * test for proselint * Revert "test for proselint" This reverts commit 9da93aa. * Revert "add time to debug" This reverts commit 71e4d16. * add e2e * enable cache * rename * lint links * add deploy * update deploy * add new script * test bash * Revert "test bash" This reverts commit 97c5ea9. * update name * remove deploy action * ignore master branch * update name * clean comment
1 parent 5c94dab commit ccb20eb

File tree

1 file changed

+135
-0
lines changed

1 file changed

+135
-0
lines changed

.github/workflows/testing.yml

Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
name: Ensure PR
2+
3+
on:
4+
push:
5+
branches-ignore:
6+
- master
7+
pull_request:
8+
9+
jobs:
10+
lint:
11+
name: Lint
12+
strategy:
13+
matrix:
14+
os: [ubuntu-latest]
15+
node-version: [12.x]
16+
runs-on: ${{ matrix.os }}
17+
steps:
18+
- uses: actions/checkout@v2
19+
20+
- name: Use Node.js ${{ matrix.node-version }}
21+
uses: actions/setup-node@v1
22+
with:
23+
node-version: ${{ matrix.node-version }}
24+
25+
- name: Get yarn cache directory path
26+
id: yarn-cache-dir-path
27+
run: echo "::set-output name=dir::$(yarn cache dir)"
28+
29+
- uses: actions/cache@v2
30+
id: yarn-cache
31+
with:
32+
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
33+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
34+
restore-keys: |
35+
${{ runner.os }}-yarn-
36+
37+
- run: yarn --frozen-lockfile
38+
- run: yarn lint:js
39+
- run: yarn lint:markdown
40+
- run: yarn lint:social
41+
42+
proseLint:
43+
name: Proselint
44+
strategy:
45+
matrix:
46+
os: [ubuntu-latest]
47+
python-version: [3.6]
48+
runs-on: ${{ matrix.os }}
49+
steps:
50+
- uses: actions/checkout@v2
51+
52+
- name: Set up Python ${{ matrix.python-version }}
53+
uses: actions/setup-python@v2
54+
with:
55+
python-version: ${{ matrix.python-version }}
56+
- uses: actions/cache@v2
57+
with:
58+
path: ~/.cache/pip
59+
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
60+
restore-keys: |
61+
${{ runner.os }}-pip-
62+
63+
- name: Install dependencies
64+
run: |
65+
python -m pip install --upgrade pip
66+
pip install -r requirements.txt
67+
68+
- run: cp .proselintrc ~/
69+
- run: proselint src/content
70+
71+
lintLinks:
72+
name: Check Links
73+
strategy:
74+
matrix:
75+
os: [ubuntu-latest]
76+
node-version: [12.x]
77+
runs-on: ${{ matrix.os }}
78+
steps:
79+
- uses: actions/checkout@v2
80+
81+
- name: Use Node.js ${{ matrix.node-version }}
82+
uses: actions/setup-node@v1
83+
with:
84+
node-version: ${{ matrix.node-version }}
85+
86+
- name: Get yarn cache directory path
87+
id: yarn-cache-dir-path
88+
run: echo "::set-output name=dir::$(yarn cache dir)"
89+
90+
- uses: actions/cache@v2
91+
id: yarn-cache
92+
with:
93+
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
94+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
95+
restore-keys: |
96+
${{ runner.os }}-yarn-
97+
98+
- run: yarn
99+
- run: yarn build
100+
- run: yarn lint:links
101+
102+
e2e:
103+
name: End to End Testing
104+
strategy:
105+
matrix:
106+
os: [ubuntu-latest]
107+
node-version: [12.x]
108+
runs-on: ${{ matrix.os }}
109+
steps:
110+
- uses: actions/checkout@v2
111+
112+
- name: Use Node.js ${{ matrix.node-version }}
113+
uses: actions/setup-node@v1
114+
with:
115+
node-version: ${{ matrix.node-version }}
116+
117+
- name: Get yarn cache directory path
118+
id: yarn-cache-dir-path
119+
run: echo "::set-output name=dir::$(yarn cache dir)"
120+
121+
- uses: actions/cache@v2
122+
id: yarn-cache
123+
with:
124+
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
125+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
126+
restore-keys: |
127+
${{ runner.os }}-yarn-
128+
129+
- run: |
130+
yarn
131+
yarn cypress install
132+
yarn cypress verify
133+
yarn fetch:supporters
134+
yarn fetch:starter-kits
135+
yarn cypress:ci

0 commit comments

Comments
 (0)