blob: 3b949f9dacaa5b115413b2280316fe779b923fb7 [file] [log] [blame]
Mohammed Nasercd45be92022-08-29 15:07:17 -04001name: lint
2on:
3 pull_request:
Mohammed Nasercd45be92022-08-29 15:07:17 -04004
5jobs:
Mohammed Naser7eadd242022-09-01 18:53:16 -04006 images:
7 runs-on: ubuntu-latest
8 steps:
9 - name: Checkout
10 uses: actions/checkout@v3.0.2
11
12 - name: Set up Go
13 uses: actions/setup-go@v3.3.0
14 with:
15 go-version-file: go.mod
16 cache: true
17
18 - name: Set up gotestfmt
19 uses: haveyoudebuggedit/gotestfmt-action@v2
Mohammed Naser8aad7f02022-09-01 18:55:44 -040020
21 - name: Run tests
22 run: |
Mohammed Naser7eadd242022-09-01 18:53:16 -040023 set -euo pipefail
24 go test -json -v ./... 2>&1 | tee /tmp/gotest.log | gotestfmt
25
26 - name: Upload test log
dependabot[bot]e24a0062022-09-02 03:39:33 +000027 uses: actions/upload-artifact@v3
Mohammed Naser7eadd242022-09-01 18:53:16 -040028 if: always()
29 with:
30 name: test-log
31 path: /tmp/gotest.log
32 if-no-files-found: error
Mohammed Nasere1b53a42022-09-15 20:45:15 -040033
34 black:
35 runs-on: ubuntu-latest
36 steps:
37 - name: Checkout project
38 uses: actions/checkout@v3.0.2
39
40 - name: Run "Black"
41 uses: psf/black@stable
42 with:
43 src: ./atmosphere
Mohammed Naser491bbd62022-09-15 21:03:41 -040044
45 flake8:
46 runs-on: ubuntu-latest
47 steps:
48 - name: Checkout project
49 uses: actions/checkout@v3.0.2
50
51 - name: Install Poetry
52 run: pipx install poetry
53
54 - name: Setup Python
55 uses: actions/setup-python@v4.2.0
56 with:
57 cache: poetry
58
59 - name: Install dependencies
60 run: poetry install --no-interaction
61
62 - name: Run Flake8
63 run: poetry run flake8 ./atmosphere