-
Notifications
You must be signed in to change notification settings - Fork 4
99 lines (96 loc) · 2.86 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
name: CI
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
jobs:
test-project-creation:
name: Test project creation with ${{ matrix.typing }} typing
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
typing: [no_typing, loose, strict]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Install Dependencies
run: |
pip install copier pre-commit
- name: Create new project
run: |
mkdir my-project
copier copy \
-d project_name=test \
-d project_short_description="A great package." \
-d python_name=test \
-d url=https://github.com/gh_actions/test \
-d min_python_version=3.10 \
-d org=gh_actions \
-d full_name=gh_actions \
-d [email protected] \
-d license=BSD \
-d backend=setuptools \
-d typing=${{ matrix.typing }} \
-d coc=our_coc \
--vcs-ref HEAD \
. my-project
- name: Check generated project installs with pip
run: |
cd my-project
git config --global user.email "[email protected]"
git config --global user.name "gh_actions"
git init
git add .
git commit -m "Initial commit"
pip install -e .
format-created-project:
name: Try formatting the created project with ${{ matrix.typing }} typing
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
typing: [no_typing, loose, strict]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Install Dependencies
run: |
pip install copier pre-commit
- name: Create new project
run: |
mkdir my-project
copier copy \
-d project_name=test \
-d project_short_description="A great package." \
-d python_name=test \
-d url=https://github.com/gh_actions/test \
-d min_python_version=3.10 \
-d org=gh_actions \
-d full_name=gh_actions \
-d [email protected] \
-d license=BSD \
-d backend=setuptools \
-d typing=${{ matrix.typing }} \
-d coc=our_coc \
--vcs-ref HEAD \
. my-project
- name: Run formatting checks
run: |
cd my-project
git init
git config --global user.email "[email protected]"
git config --global user.name "gh_actions"
git add --all
git commit -m "Initial commit"
pre-commit run --all-files