Skip to content

Simplify import

Simplify import #125

Workflow file for this run

name: CI
on:
push:
branches: [ main ]
tags: [ '*' ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Create virtual environment
run: python3 -m venv .venv
- name: Build web assets
run: npm install && npm run build
- name: Install dependencies
run: .venv/bin/pip install .[dev]
- name: Check formatting
run: make format-check
- name: Check types
run: make mypy
- name: Lint
run: make pylint
- name: Install browsers
run: .venv/bin/playwright install --with-deps chromium
- name: Test
run: make test
- name: Upload screenshots on test failures
uses: actions/upload-artifact@v3
if: failure()
with:
name: screenshots
path: test-results
- id: auth
name: Authenticate with Google Cloud
uses: google-github-actions/auth@v1
with:
token_format: access_token
credentials_json: '${{ secrets.GCP_CREDENTIALS_CI }}'
- name: Login to Docker repository
uses: docker/login-action@v3
with:
registry: europe-west1-docker.pkg.dev
username: oauth2accesstoken
password: ${{ steps.auth.outputs.access_token }}
- id: meta
name: Extract metadata
uses: docker/metadata-action@v5
with:
images: europe-west1-docker.pkg.dev/dft-ate-schemes/docker/schemes
tags: |
type=semver,pattern={{version}}
type=raw,value=latest,enable={{is_default_branch}}
- name: Build and push image
uses: docker/build-push-action@v5
with:
context: .
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
push: true