-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (39 loc) · 1.08 KB
/
ci.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
name: CI
on:
push:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v3
with:
python-version: '3.10'
- name: Install dependencies
run: pip install .[dev]
- name: Install browsers
run: playwright install --with-deps chromium
- name: Run type check
run: mypy schemes
- name: Run tests
run: pytest
- id: auth
name: Authenticate with Google Cloud
uses: google-github-actions/auth@v1
with:
token_format: access_token
credentials_json: '${{ secrets.GCP_CREDENTIALS }}'
- name: Login to Docker repository
uses: docker/login-action@v1
with:
registry: europe-west1-docker.pkg.dev
username: oauth2accesstoken
password: ${{ steps.auth.outputs.access_token }}
- name: Build and push image
uses: docker/build-push-action@v4
with:
tags: europe-west1-docker.pkg.dev/dft-ate-schemes-prt/docker/schemes
push: true