blob: ff73e698667e00d625f243cf1794955c16d97d98 [file] [log] [blame]
name: lint
on:
pull_request:
jobs:
images:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3.0.2
- name: Set up Go
uses: actions/setup-go@v3.3.0
with:
go-version-file: go.mod
cache: true
- name: Set up gotestfmt
uses: haveyoudebuggedit/gotestfmt-action@v2
- name: Run tests
run: |
set -euo pipefail
go test -json -v ./... 2>&1 | tee /tmp/gotest.log | gotestfmt
- name: Upload test log
uses: actions/upload-artifact@v3
if: always()
with:
name: test-log
path: /tmp/gotest.log
if-no-files-found: error
black:
runs-on: ubuntu-latest
steps:
- name: Checkout project
uses: actions/checkout@v3.0.2
- name: Run "Black"
uses: psf/black@stable
with:
src: ./atmosphere
flake8:
runs-on: ubuntu-latest
steps:
- name: Checkout project
uses: actions/checkout@v3.0.2
- name: Install Poetry
run: pipx install poetry
- name: Setup Python
uses: actions/setup-python@v4.2.0
with:
cache: poetry
- name: Install dependencies
run: poetry install --no-interaction
- name: Run Flake8
run: poetry run flake8 ./atmosphere