-
Notifications
You must be signed in to change notification settings - Fork 1
75 lines (69 loc) · 1.83 KB
/
test_code.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
72
73
74
75
name: PR Check - Code
on: [pull_request]
jobs:
links:
name: Check links
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Set up Python 3.7
uses: actions/[email protected]
with:
python-version: 3.7
- name: Install dependencies
run: pip install -r requirements.txt
- name: Check links
run: python link_checker.py
build-frontend:
name: Test that frontend production bundle builds
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@master
- uses: actions/[email protected]
name: Install node
with:
node-version: '12.x'
- name: Build dependencies
run: npm ci --only=production
- name: Build production bundle
env:
CI: true
run: npm run build
- uses: actions/upload-artifact@master
name: Upload website content
with:
name: gatsby-public
path: public
test:
name: Lint and test frontend
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@master
- uses: actions/[email protected]
name: Install node
with:
node-version: '10.x'
- name: Install dependencies
run: npm install
- name: End to end test
run: npm test
- name: Lint
run: npm run lint
code-security:
name: Code security scan
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
language: ['javascript']
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1