-
Notifications
You must be signed in to change notification settings - Fork 4
46 lines (38 loc) · 1.34 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
name: CI
on: [push, pull_request]
jobs:
lint-and-test:
runs-on: ubuntu-latest
env:
ACCOUNT_ID: ${{ secrets.ACCOUNT_ID }}
READ_ACCESS_KEY_ID: ${{ secrets.READ_ACCESS_KEY_ID }}
READ_SECRET_ACCESS_KEY: ${{ secrets.READ_SECRET_ACCESS_KEY }}
WRITE_ACCESS_KEY_ID: ${{ secrets.WRITE_ACCESS_KEY_ID }}
WRITE_SECRET_ACCESS_KEY: ${{ secrets.WRITE_SECRET_ACCESS_KEY }}
steps:
- uses: actions/checkout@v4
- name: Set up UV
uses: astral-sh/setup-uv@v4
with:
python-version: '3.11'
- name: Install dependencies
run: uv sync --extra all
- name: Create .env.yaml
run: |
echo "account_id: \"$ACCOUNT_ID\"" > .env.yaml
echo "read:" >> .env.yaml
echo " access_key_id: \"$READ_ACCESS_KEY_ID\"" >> .env.yaml
echo " secret_access_key: \"$READ_SECRET_ACCESS_KEY\"" >> .env.yaml
echo "write:" >> .env.yaml
echo " access_key_id: \"$WRITE_ACCESS_KEY_ID\"" >> .env.yaml
echo " secret_access_key: \"$WRITE_SECRET_ACCESS_KEY\"" >> .env.yaml
- name: Run Ruff Lint
uses: astral-sh/ruff-action@v1
with:
args: check
- name: Run Ruff Format
uses: astral-sh/ruff-action@v1
with:
args: format --check
- name: Run Tests
run: uv run pytest