Skip to content

Commit c1d9ef7

Browse files
committed
devops: add github workflows
1 parent 4f0f4e6 commit c1d9ef7

File tree

3 files changed

+101
-0
lines changed

3 files changed

+101
-0
lines changed

.github/workflows/publish.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Publish
2+
3+
on:
4+
release:
5+
types: [published]
6+
workflow_dispatch:
7+
8+
jobs:
9+
publish:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v3
13+
- name: Set up Python
14+
uses: actions/setup-python@v4
15+
with:
16+
python-version: 3.6
17+
- name: Install Flit
18+
run: pip install flit
19+
- name: Install Dependencies
20+
run: flit install --symlink
21+
- name: Publish
22+
env:
23+
FLIT_USERNAME: ${{ secrets.FLIT_USERNAME }}
24+
FLIT_PASSWORD: ${{ secrets.FLIT_PASSWORD }}
25+
run: flit publish
26+
# - name: Deploy Documentation
27+
# run: make doc-deploy

.github/workflows/test.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Test
2+
3+
on:
4+
push:
5+
pull_request:
6+
types: [assigned, opened, synchronize, reopened]
7+
8+
jobs:
9+
test_coverage:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v3
14+
- name: Set up Python
15+
uses: actions/setup-python@v4
16+
with:
17+
python-version: 3.8
18+
- name: Install Flit
19+
run: pip install flit
20+
- name: Install Dependencies
21+
run: flit install --symlink
22+
- name: Test
23+
run: pytest --cov=easy --cov-report=xml tests
24+
- name: Coverage
25+
uses: codecov/codecov-action@v3

.github/workflows/test_full.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Full Test
2+
3+
on:
4+
push:
5+
pull_request:
6+
types: [assigned, opened, synchronize, reopened]
7+
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10']
15+
django-version: ['<2.1', '<2.2', '<3.0', '<3.1', '<3.2', '<3.3', '<4.1']
16+
17+
steps:
18+
- uses: actions/checkout@v3
19+
- name: Set up Python
20+
uses: actions/setup-python@v4
21+
with:
22+
python-version: ${{ matrix.python-version }}
23+
- name: Install core
24+
run: pip install "Django${{ matrix.django-version }}" pydantic
25+
- name: Install tests
26+
run: pip install pytest pytest-asyncio pytest-django django django-ninja-extra factory-boy
27+
- name: Test
28+
run: pytest
29+
codestyle:
30+
runs-on: ubuntu-latest
31+
32+
steps:
33+
- uses: actions/checkout@v3
34+
- name: Set up Python
35+
uses: actions/setup-python@v4
36+
with:
37+
python-version: 3.9
38+
- name: Install Flit
39+
run: pip install flit
40+
- name: Install Dependencies
41+
run: flit install --symlink
42+
- name: Black
43+
run: black --check easy tests
44+
- name: isort
45+
run: isort --check easy tests
46+
- name: Flake8
47+
run: flake8 easy tests
48+
- name: mypy
49+
run: mypy easy

0 commit comments

Comments
 (0)