forked from bugsink/bugsink
-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (52 loc) · 1.96 KB
/
copilot-setup-steps.yml
File metadata and controls
59 lines (52 loc) · 1.96 KB
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
name: "Copilot Setup Steps"
on:
push:
paths:
- ".github/workflows/copilot-setup-steps.yml"
workflow_dispatch:
# The "on" section defines when this workflow runs independently.
# It has no effect on Copilot itself — Copilot runs this job on demand
# if the job name is exactly "copilot-setup-steps".
# These triggers just let us test the workflow manually if needed.
jobs:
copilot-setup-steps:
runs-on: ubuntu-latest
permissions:
contents: read
env:
DJANGO_SETTINGS_MODULE: bugsink.settings.development
SAMPLES_DIR: ${{ github.workspace }}/event-samples
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Install project `pre-commit` hook
run: |
cp pre-commit .git/hooks/pre-commit
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements.development.txt
# We install directly from source using pip — no wheels, no Docker.
# This keeps the setup fast and simple for Copilot.
# To ensure correctness for more complex scenarios (e.g. multiple DBs),
# we rely on the actual CI pipeline.
- name: Run migrations
run: |
python manage.py migrate
# Ensures the SQLite database is initialized.
- name: Create superuser
env:
DJANGO_SUPERUSER_USERNAME: admin@example.com
DJANGO_SUPERUSER_EMAIL: admin@example.com
DJANGO_SUPERUSER_PASSWORD: admin
run: |
python manage.py createsuperuser --noinput
- name: Check out event-samples outside workspace
# by using a plain-old `git-clone` we are able to "ecape from the working dir"
run: |
git clone https://github.com/bugsink/event-samples.git ../event-samples