-
-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (44 loc) · 1.45 KB
/
backend-test.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
51
name: "Backend: Lint & Test"
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
jobs:
lint_and_test:
name: Lint & Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
enable-cache: true
- name: Install the project
run: uv sync --frozen --directory backend
- name: Lint the project
run: |
source backend/.venv/bin/activate
uv run --directory backend task lint
- name: Tailscale
uses: tailscale/github-action@v2
with:
oauth-client-id: ${{ secrets.TS_OAUTH_CLIENT_ID }}
oauth-secret: ${{ secrets.TS_OAUTH_SECRET }}
tags: tag:ci
- name: Run tests
env:
PREFECT_API_URL: ${{ secrets.PREFECT_API_URL }}
SUBABOT_BACKEND_URL: ${{ secrets.SUBABOT_BACKEND_URL }}
SUBABOT_FRONTEND_URL: ${{ secrets.SUBABOT_FRONTEND_URL }}
SLACK_CLIENT_ID: ${{ secrets.SLACK_CLIENT_ID }}
SLACK_CLIENT_SECRET: ${{ secrets.SLACK_CLIENT_SECRET }}
SLACK_SIGNING_SECRET: ${{ secrets.SLACK_SIGNING_SECRET }}
SLACK_APP_ID: ${{ secrets.SLACK_APP_ID }}
SLACK_TEAM_ID: ${{ secrets.SLACK_TEAM_ID }}
SLACK_CHANNEL_ID: ${{ secrets.SLACK_CHANNEL_ID }}
run: |
source backend/.venv/bin/activate
uv run --directory backend task test