-
Notifications
You must be signed in to change notification settings - Fork 0
113 lines (99 loc) · 3.15 KB
/
pr-tests.yml
File metadata and controls
113 lines (99 loc) · 3.15 KB
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
105
106
107
108
109
110
111
112
113
name: PR Tests
# PR tests are currently disabled
on:
# pull_request:
# branches: [ master ]
workflow_dispatch: {}
jobs:
application-tests:
name: PR Tests
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install uv
uv venv
uv sync
- name: Run lint tests
run: |
source .venv/bin/activate
make lint_tests
- name: Run unit tests
run: |
source .venv/bin/activate
make unit_tests
# - name: Add coverage to PR
# id: jacoco
# uses: orgoro/coverage@v3.2
# with:
# coverageFile: coverage.xml
# token: ${{ secrets.GITHUB_TOKEN }}
# terraform-tests:
# name: Terraform Tests
# runs-on: ubuntu-latest
# permissions:
# contents: read
# env:
# GCP_PROJECT_ID: ${{secrets.GCP_PROJECT_ID}}
# GCP_SA_KEY: ${{secrets.GCP_SA_KEY}}
# GCP_REGION: ${{secrets.GCP_REGION}}
# steps:
# - uses: actions/checkout@v4
# - uses: 'google-github-actions/auth@v2'
# with:
# credentials_json: ${{secrets.GCP_CREDENTIALS}}
# - name: Setup Terraform
# uses: hashicorp/setup-terraform@v3
# - name: Terraform Init
# run: terraform -chdir=terraform init
# - name: Terraform Validate
# run: terraform -chdir=terraform validate
# - name: Terraform Plan
# run: |
# terraform -chdir=terraform plan \
# -var "gcp_project_id=$GCP_PROJECT_ID" \
# -var "gcp_sa_key=$GCP_SA_KEY" \
# -var "gcp_region=$GCP_REGION" \
# -var "image_tag=${{ github.sha }}"
# docker_build_only:
# name: Build docker image
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - name: Install dependencies
# run: |
# python -m pip install --upgrade pip
# pip install uv
# - name: Build the Docker image
# run: |
# uv pip compile pyproject.toml -o requirements.txt
# docker build . -t ghcr.io/${{ github.repository }}:latest
# docker_build_armv7:
# name: Build docker image for armv7
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - name: Install Rust toolchain
# uses: actions-rust-lang/setup-rust-toolchain@v1.11.0
# with:
# toolchain: stable
# - name: Install dependencies
# run: |
# python -m pip install --upgrade pip
# pip install uv
# - name: Set up QEMU
# uses: docker/setup-qemu-action@v3
# - name: Set up Docker Buildx
# uses: docker/setup-buildx-action@v3
# - name: Build the Docker image
# run: |
# uv run python cicd/deploy/modify_pyproject_toml.py
# docker buildx build --platform linux/arm/v7 . -t ghcr.io/${{ github.repository }}:latest