-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e751ce4
commit 695da07
Showing
1 changed file
with
69 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
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: redis | ||
REDIS_PASSWORD: null | ||
|
||
jobs: | ||
build: | ||
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" | ||
|
||
- name: Install dependencies | ||
run: | ||
apt-get update && apt-get install -y curl libcurl4-openssl-dev build-essential libssl-dev | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
|
||
- name: Test code | ||
continue-on-error: false | ||
run: | ||
pytest . | ||
|
||
- name: Format and Lint Code with Ruff | ||
run: | ||
ruff format . --line-length=120 | ||
ruff check . --fix | ||
|