-
Notifications
You must be signed in to change notification settings - Fork 3.9k
44 lines (35 loc) · 1.13 KB
/
ci-static-analysis.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
name: Static analysis
on: pull_request
jobs:
tests:
name: Static analysis
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version:
- "3.11"
os: ["ubuntu-22.04"]
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install system requirements
run: sudo apt update && sudo apt install -y libxmlsec1-dev
- name: Install pip
run: python -m pip install -r requirements/pip.txt
- name: Get pip cache dir
id: pip-cache-dir
run: echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
- name: Cache pip dependencies
id: cache-dependencies
uses: actions/cache@v4
with:
path: ${{ steps.pip-cache-dir.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('requirements/edx/development.txt') }}
restore-keys: ${{ runner.os }}-pip-
- name: Install python dependencies
run: make dev-requirements
- name: Static code analysis
run: make check-types