-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (45 loc) · 1.2 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
name: Run CI
# Run this workflow every time a new commit pushed to your repository
on:
push:
branches:
- main
tags:
- '*'
pull_request:
workflow_dispatch:
jobs:
tests:
runs-on: ubuntu-latest
name: Test the creation of a Django project from the template
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install Django 4.2
run: pip install django~=4.2.0
- name: Run the startproject command
run: |
mkdir tmp
django-admin startproject \
--template . \
--extension=py-tpl,rst,gitignore,in,ini,cfg,toml,yml,yaml \
--name LICENSE \
-x tmp \
-x .github \
defaultapp tmp/
- name: Run basic checks (following README instructions)
run: |
pip install -e .[tests]
django-admin check
pytest
env:
PYTHONPATH: .
DJANGO_SETTINGS_MODULE: testapp.settings
working-directory: tmp
- name: Run dummy package build
run: |
pip install build
python -m build
working-directory: tmp