Skip to content

Commit e88dcd4

Browse files
committed
updated github actions
1 parent b80f9a2 commit e88dcd4

File tree

1 file changed

+18
-28
lines changed

1 file changed

+18
-28
lines changed

.github/workflows/tests.yaml

Lines changed: 18 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -5,36 +5,30 @@ jobs:
55
test:
66
name: Test (Python ${{ matrix.python-version }})
77
runs-on: ubuntu-latest
8+
# always run on push events
9+
# only run on pull_request_target event when pull request pulls from fork repository
810
if: >
911
github.event_name == 'push' ||
1012
github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.full_name != github.repository
1113
strategy:
1214
fail-fast: false
1315
matrix:
14-
python-version: [3.7, 3.8, 3.9, "3.10", "3.13"]
16+
python-version: [3.7, 3.8, 3.9, "3.10","3.13"]
1517

1618
steps:
17-
- uses: actions/checkout@v3
19+
- uses: actions/checkout@v2
1820

19-
- name: Set up Python
20-
uses: actions/setup-python@v4
21+
- uses: actions/[email protected]
2122
with:
2223
python-version: ${{ matrix.python-version }}
2324

24-
- name: Install System Dependencies
25-
run: sudo apt-get update && sudo apt-get install -y libffi-dev libssl-dev build-essential
25+
- run: pip install -U setuptools
2626

27-
- name: Upgrade pip and setuptools
28-
run: pip install --upgrade pip setuptools wheel
27+
- run: pip install -r requirements.txt
2928

30-
- name: Install dependencies
31-
run: pip install -r requirements.txt
29+
- run: pip install -e .[dev]
3230

33-
- name: Install dev dependencies
34-
run: pip install -e .[dev]
35-
36-
- name: Run tests
37-
run: pytest -v
31+
- run: pytest -v
3832

3933
examples:
4034
name: Check Examples
@@ -44,22 +38,18 @@ jobs:
4438
github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.full_name != github.repository
4539
4640
steps:
47-
- uses: actions/checkout@v3
41+
- uses: actions/checkout@v2
4842

49-
- name: Set up Python 3.13
50-
uses: actions/setup-python@v4
43+
- uses: actions/setup-python@v4
5144
with:
5245
python-version: 3.13.2
5346

54-
- name: Install System Dependencies
55-
run: sudo apt-get update && sudo apt-get install -y libffi-dev libssl-dev build-essential
47+
- run: pip install --upgrade setuptools
48+
49+
- run: pushd examples/aml && pip install -r requirements.txt && popd
50+
51+
- run: pushd examples/yoti_example_django && pip install --upgrade pip && pip install -r requirements.txt && popd
5652

57-
- name: Upgrade pip and setuptools
58-
run: pip install --upgrade pip setuptools wheel
53+
- run: pushd examples/yoti_example_flask && pip install -r requirements.txt && popd
5954

60-
- name: Install Example Dependencies
61-
run: |
62-
pushd examples/aml && pip install -r requirements.txt && popd
63-
pushd examples/yoti_example_django && pip install -r requirements.txt && popd
64-
pushd examples/yoti_example_flask && pip install -r requirements.txt && popd
65-
pushd examples/doc_scan && pip install -r requirements.txt && popd
55+
- run: pushd examples/doc_scan && pip install -r requirements.txt && popd

0 commit comments

Comments
 (0)