-
Notifications
You must be signed in to change notification settings - Fork 7
54 lines (41 loc) · 1.36 KB
/
check-python.yml
File metadata and controls
54 lines (41 loc) · 1.36 KB
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
name: Check-Python
on:
pull_request:
paths:
- backend/**
env:
AWS_REGION : "us-east-1"
# Permission can be added at job level or workflow level
permissions:
id-token: write # This is required for requesting the JWT
contents: read # This is required for actions/checkout
jobs:
LintPython:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@v5
with:
python-version: '3.12'
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: Install dev dependencies
run: "pip install -r backend/compact-connect/requirements-dev.txt"
- name: Lint Code
run: "cd backend; ruff check $(git ls-files '*.py')"
TestPython:
runs-on: ubuntu-latest
steps:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: Install dev dependencies
run: "pip install -r backend/compact-connect/requirements-dev.txt"
- name: Install all dependencies
run: "cd backend; bin/sync_deps.sh"
- name: Test backend
run: "cd backend; bin/run_tests.sh -l python -no"
- name: Check Dependencies
run: "pip-audit"