-
Notifications
You must be signed in to change notification settings - Fork 1
42 lines (35 loc) · 1.01 KB
/
python-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
name: Test Python Package
on:
pull_request:
branches:
- main
- dev/v\d+\.\d+\.\d+
types: [opened, reopened, synchronize]
permissions:
contents: read
jobs:
build:
uses: xpodev/py-jsx/.github/workflows/build-frontend-assets.yml@dev/v0.5.0
test:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: "3.x"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install fastapi uvicorn httpx
- name: Downloading the latest version of the frontend assets
uses: actions/download-artifact@v4
with:
name: frontend-assets
path: src/jsx/server/static
- name: Run tests
working-directory: ${{ github.workspace }}
run: |
python -m unittest discover -s tests -p 'test_*.py' -t ${{ github.workspace }}