-
Notifications
You must be signed in to change notification settings - Fork 1
82 lines (66 loc) · 2.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
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
name: CI
on:
push:
branches: main
pull_request:
branches: main
# allow manually triggering this workflow
workflow_dispatch: {}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
DB_URL: ${{secrets.DB_URL}}
JWT_SECRET_KEY: ${{secrets.JWT_SECRET_KEY}}
AWS_ACCESS_KEY_ID: ${{secrets.AWS_ACCESS_KEY_ID}}
AWS_SECRET_ACCESS_KEY: ${{secrets.AWS_SECRET_ACCESS_KEY}}
AWS_REGION_NAME: ${{secrets.AWS_REGION_NAME}}
SQS_QUEUE_NAME: ${{secrets.SQS_QUEUE_NAME}}
S3_BUCKET_URL: ${{secrets.S3_BUCKET_URL}}
S3_BUCKET_NAME: ${{secrets.S3_BUCKET_NAME}}
S3_LOGS_FOLDER: ${{secrets.S3_LOGS_FOLDER}}
REDIS_HOST: localhost
APP_ENVIRONMENT: github_workflow
jobs:
build:
timeout-minutes: 15
runs-on: ubuntu-latest
services:
# Label used to access the service container
redis:
image: redis
# Set health checks to wait until redis has started
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 6379:6379
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
cache: "pip"
- name: Install PyCurl Dependencies
run:
sudo apt-get update && sudo apt-get install -y curl libcurl4-openssl-dev build-essential libssl-dev
- name: Install Dependencies
run:
python -m pip install --upgrade pip &&
pip install -r requirements.txt
- name: Test code
run:
pytest . -s -v -W ignore
- name: Check Code Formatting
run:
ruff format --line-length=120 --check .
- name: Check Code Linting
run:
ruff check .
- name: Setup Tmate Session
if: ${{ failure() }}
uses: mxschmitt/action-tmate@v3