-
Notifications
You must be signed in to change notification settings - Fork 0
104 lines (97 loc) · 2.58 KB
/
test.yaml
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
name: Test
on:
pull_request:
branches:
- main
push:
branches:
- main
schedule:
- cron: "0 0 * * 0"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
COMPOSE_DOCKER_CLI_BUILD: 1
DOCKER_BUILDKIT: 1
jobs:
lint-infra:
name: Lint infra
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install kubeval
run: |
wget https://github.com/instrumenta/kubeval/releases/latest/download/kubeval-linux-amd64.tar.gz
tar xf kubeval-linux-amd64.tar.gz
sudo cp kubeval /usr/local/bin
- name: Kustomize build
run: kubectl kustomize kubernetes/alzabo/base
- name: Kubeval
run: make kubeval
lint-backend:
name: Lint backend
runs-on: ubuntu-latest
steps:
- name: Remove unnecessary files
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- uses: actions/checkout@v4
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Pull image
run: |
docker pull ghcr.io/josephine-wolf-oberholtzer/alzabo:latest || true
- name: Build image
run: make build
- name: Black
run: make black-check
- name: Isort
run: make isort-check
- name: Flake8
run: make flake8
- name: Mypy
run: make mypy
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Remove unnecessary files
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- name: Checkout
uses: actions/checkout@v4
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Pull image
run: |
docker pull ghcr.io/josephine-wolf-oberholtzer/alzabo:latest || true
- name: Create LFS file list
run: git lfs ls-files -l | cut -d ' ' -f1 | sort > .lfs-assets-id
- name: Restore LFS cache
uses: actions/cache@v4
id: lfs-cache
with:
path: .git/lfs
key: ${{ runner.os }}-lfs-${{ hashFiles('.lfs-assets-id') }}-v1
restore-keys: |
${{ runner.os }}-lfs-
- name: Git LFS Pull
run: git lfs pull
- name: Build image
run: make build
- name: Bring up containers
run: make up
- name: Pytest
run: make pytest-cov
timeout-minutes: 20