-
Notifications
You must be signed in to change notification settings - Fork 8
39 lines (36 loc) · 903 Bytes
/
check_code.yaml
File metadata and controls
39 lines (36 loc) · 903 Bytes
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
name: Code quality
on:
push:
branches:
- main
pull_request:
types:
- opened
- reopened
- synchronize
jobs:
fourcipp-code-check:
name: Code check
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up virtual environment
uses: ./.github/actions/setup-env
with:
python-version: 3.13
- name: Install requirements
shell: bash -el {0}
run: |
conda activate fourcipp
pip install -e .[dev,safe]
pip install pre-commit
- name: Run code-checks
shell: bash -el {0}
run: |
conda activate fourcipp
if [ "${GITHUB_REF}" = "refs/heads/main" ]; then
SKIP=no-commit-to-branch pre-commit run --all-files
else
pre-commit run --all-files
fi