Spaces:
Runtime error
Runtime error
🥶 Add environment to build_and_test pipeline
Browse files
.github/workflows/python-package.yml
CHANGED
@@ -2,29 +2,29 @@ name: Python package
|
|
2 |
|
3 |
on:
|
4 |
push:
|
5 |
-
branches: [
|
6 |
pull_request:
|
7 |
-
branches: [
|
8 |
|
9 |
jobs:
|
10 |
-
|
11 |
-
|
12 |
runs-on: ubuntu-latest
|
|
|
13 |
strategy:
|
14 |
fail-fast: false
|
15 |
matrix:
|
16 |
python-version: ["3.9", "3.10"]
|
17 |
|
18 |
steps:
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
|
|
2 |
|
3 |
on:
|
4 |
push:
|
5 |
+
branches: ["main"]
|
6 |
pull_request:
|
7 |
+
branches: ["main"]
|
8 |
|
9 |
jobs:
|
10 |
+
build_and_test:
|
|
|
11 |
runs-on: ubuntu-latest
|
12 |
+
environment: Development
|
13 |
strategy:
|
14 |
fail-fast: false
|
15 |
matrix:
|
16 |
python-version: ["3.9", "3.10"]
|
17 |
|
18 |
steps:
|
19 |
+
- uses: actions/checkout@v3
|
20 |
+
- name: Set up Python ${{ matrix.python-version }}
|
21 |
+
uses: actions/setup-python@v3
|
22 |
+
with:
|
23 |
+
python-version: ${{ matrix.python-version }}
|
24 |
+
- name: Install dependencies
|
25 |
+
run: |
|
26 |
+
python -m pip install --upgrade pip
|
27 |
+
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
|
28 |
+
- name: Test with pytest
|
29 |
+
run: |
|
30 |
+
pytest
|