-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (50 loc) · 1.64 KB
/
build-and-test.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: "Build and test"
on: [push, pull_request]
jobs:
test:
name: "Test on Python ${{ matrix.python-version }}"
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8']
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install -r requirements.txt -r requirements-dev.txt
- name: Check types with mypy
run: MYPYPATH=.:djenius-base mypy --namespace-packages -p djenius
- name: Test djenius
run: PYTHONPATH=.:djenius-base pytest test/
package:
name: "Build Python ${{ matrix.python-version }} package with Node ${{ matrix.node-version }}"
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8']
node-version: ['14']
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Build optimized frontend bundle
run: cd frontend && yarn install && yarn run build
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Build djenius-base sdist
run: cd djenius-base && python setup.py sdist
- name: Build djenius sdist
run: python setup.py sdist
- name: Upload Python sdists
uses: actions/upload-artifact@v2
with:
name: djenius-sdist
path: |
dist/*.tar.gz
djenius-base/dist/*.tar.gz