Mohammed Naser | cd45be9 | 2022-08-29 15:07:17 -0400 | [diff] [blame] | 1 | name: lint |
| 2 | on: |
| 3 | pull_request: |
Mohammed Naser | cd45be9 | 2022-08-29 15:07:17 -0400 | [diff] [blame] | 4 | |
| 5 | jobs: |
Mohammed Naser | 7eadd24 | 2022-09-01 18:53:16 -0400 | [diff] [blame] | 6 | 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 Naser | 8aad7f0 | 2022-09-01 18:55:44 -0400 | [diff] [blame] | 20 | |
| 21 | - name: Run tests |
| 22 | run: | |
Mohammed Naser | 7eadd24 | 2022-09-01 18:53:16 -0400 | [diff] [blame] | 23 | set -euo pipefail |
| 24 | go test -json -v ./... 2>&1 | tee /tmp/gotest.log | gotestfmt |
| 25 | |
| 26 | - name: Upload test log |
dependabot[bot] | e24a006 | 2022-09-02 03:39:33 +0000 | [diff] [blame] | 27 | uses: actions/upload-artifact@v3 |
Mohammed Naser | 7eadd24 | 2022-09-01 18:53:16 -0400 | [diff] [blame] | 28 | if: always() |
| 29 | with: |
| 30 | name: test-log |
| 31 | path: /tmp/gotest.log |
| 32 | if-no-files-found: error |
Mohammed Naser | e1b53a4 | 2022-09-15 20:45:15 -0400 | [diff] [blame] | 33 | |
| 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 Naser | 491bbd6 | 2022-09-15 21:03:41 -0400 | [diff] [blame] | 44 | |
| 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 |