Skip to content

Commit 79d0f23

Browse files
committed
Migrate CI from circleci to github actions
1 parent c17a5fe commit 79d0f23

File tree

3 files changed

+50
-62
lines changed

3 files changed

+50
-62
lines changed

.circleci/config.yml

Lines changed: 0 additions & 62 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Run Test
2+
3+
on:
4+
workflow_call:
5+
pull_request:
6+
7+
permissions:
8+
id-token: write # This is required for requesting the JWT
9+
contents: read # This is required for actions/checkout
10+
11+
jobs:
12+
test:
13+
name: 🚴 Test 🚴
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- uses: actions/checkout@main
18+
19+
- name: 🐳 Set up Docker Buildx
20+
id: buildx
21+
uses: docker/setup-buildx-action@v3
22+
23+
- name: 🐳 Build image
24+
uses: docker/build-push-action@v6
25+
with:
26+
context: .
27+
file: Dockerfile
28+
push: false
29+
tags: ifrcgo/go-api:latest
30+
cache-from: type=gha
31+
cache-to: type=gha,mode=max
32+
33+
- name: 🕮 Validate if there are no pending django migrations.
34+
run: |
35+
docker compose run --rm serve ./manage.py makemigrations --check --dry-run || {
36+
echo 'There are some changes to be reflected in the migration. Make sure to run makemigrations';
37+
exit 1;
38+
}
39+
40+
- name: 🕮 Validate SentryMonitor config
41+
run: |
42+
docker compose run --rm serve ./manage.py cron_job_monitor --validate-only || {
43+
echo 'There are some changes to be reflected in the SentryMonitor. Make sure to update SentryMonitor';
44+
exit 1;
45+
}
46+
47+
- name: 🤞 Run Test 🧪
48+
run: |
49+
time docker compose run --rm serve ./manage.py test --keepdb -v 2 --pattern="test_fake.py" &&
50+
docker compose run --rm serve pytest --reuse-db --durations=10
File renamed without changes.

0 commit comments

Comments
 (0)