-
-
Notifications
You must be signed in to change notification settings - Fork 17
57 lines (49 loc) · 1.9 KB
/
python-lint.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
# Modified from CodeQL file
---
name: "CI: build, mypy, pyflakes, codespell, test"
on:
workflow_dispatch:
push:
pull_request:
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2
# If this run was triggered by a pull request event, then checkout
# the head of the pull request instead of the merge commit.
- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}
- name: Build CI containers
id: containerBuild
run: |
python3 ./tools/containers/build_ci_images.py
- name: Test build
if: always() && (steps.containerBuild.outcome == 'success')
run: |
podman run --rm bubblejail-ci-build-archlinux \
sh -ceu 'meson setup build && meson compile -C build'
- name: Lint with pyflakes
if: always() && (steps.containerBuild.outcome == 'success')
run: |
podman run --rm bubblejail-ci-analysis-archlinux:latest pyflakes .
- name: Lint with mypy
if: always() && (steps.containerBuild.outcome == 'success')
run: |
podman run --rm bubblejail-ci-analysis-archlinux:latest \
mypy --strict --ignore-missing-imports .
- name: Lint with codespell
if: always() && (steps.containerBuild.outcome == 'success')
run: |
podman run --rm bubblejail-ci-analysis-archlinux:latest codespell .
- name: Run tests
if: always() && (steps.containerBuild.outcome == 'success')
run: |
podman run --rm bubblejail-ci-test-archlinux:latest \
sh -ceu 'meson setup build && meson test --verbose -C build'