-
Notifications
You must be signed in to change notification settings - Fork 24
48 lines (47 loc) · 1.33 KB
/
action.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
name: fastadmin ci
on: [create, push]
jobs:
fastadmin-ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install poetry
run: pipx install poetry
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: "poetry"
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: 'yarn'
cache-dependency-path: 'frontend/yarn.lock'
- name: Install Dependencies
run: make install
- name: Run Lint
run: make lint
- name: Run Tests
env:
ADMIN_USER_MODEL: User
ADMIN_USER_MODEL_USERNAME_FIELD: username
ADMIN_SECRET_KEY: secret_key
run: make test
- name: Run Build
run: make -C frontend build
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
fastadmin-cd:
runs-on: ubuntu-latest
needs: [fastadmin-ci]
if: github.event_name == 'create' && github.event.ref_type == 'tag'
steps:
- uses: actions/checkout@v3
- name: Install poetry
run: pipx install poetry
- name: Deploy Package
run: |
poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }}
poetry build
poetry publish