-
Notifications
You must be signed in to change notification settings - Fork 96
109 lines (104 loc) · 3.02 KB
/
pull_request.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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
name: Validate Pull Request
on:
push:
branches: [main, "integration/**", "releases/**"]
pull_request:
branches: [main, "integration/**", "releases/**"]
repository_dispatch:
types: [pull_request]
schedule:
- cron: "30 23 * * 1" # 2330 UTC Every Monday
env:
PYTHON_VERSION: 3.9
POETRY_PATH: "$HOME/.poetry/bin"
jobs:
code_analysis:
name: Code Analysis
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: ["python"]
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v2
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Change Directory
run: cd ${{ github.workspace }}
- name: Setup Environment
run: make environment
- name: Add Poetry Path
run: echo ${{ env.POETRY_PATH }} >> $GITHUB_PATH
- name: Install Dependencies
run: make install
- name: Lint
run: make lint
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: "${{ matrix.language }}"
- name: Autobuild
uses: github/codeql-action/autobuild@v2
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
linux_check:
name: Linux Check
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v2
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Change Directory
run: cd ${{ github.workspace }}
- name: Setup Environment
run: make environment
- name: Add Poetry Path
run: echo ${{ env.POETRY_PATH }} >> $GITHUB_PATH
- name: Install Dependencies
run: make install
- name: Build
run: make build validate
- name: Full Test Suite & Coverage
uses: nick-fields/retry@v2
with:
timeout_minutes: 10
max_attempts: 1
retry_on: timeout
command: make coverage
mac_check:
name: MacOS Check
runs-on: macos-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v2
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Change Directory
run: cd ${{ github.workspace }}
- name: Setup Environment
run: make environment
- name: Add Poetry Path
run: echo ${{ env.POETRY_PATH }} >> $GITHUB_PATH
- name: Install Dependencies
run: make install
- name: Build
run: make build validate
- name: Integration Tests
uses: nick-fields/retry@v2
with:
timeout_minutes: 3
max_attempts: 1
retry_on: timeout
command: make test-integration