Skip to content

Commit 9d22a13

Browse files
committed
👷 Add github actions to run unit-tests on PR
1 parent 22e5623 commit 9d22a13

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: tests
2+
3+
on: pull_request
4+
5+
jobs:
6+
tests:
7+
runs-on: ubuntu-latest
8+
permissions:
9+
contents: read
10+
pull-requests: write
11+
steps:
12+
- uses: actions/checkout@v4
13+
with: # Use deploy key to ensure pushed change trigger checks as well : https://github.com/peter-evans/create-pull-request/blob/master/docs/concepts-guidelines.md#workarounds-to-trigger-further-workflow-runs
14+
ssh-key: ${{ secrets.SSH_PRIVATE_KEY }}
15+
- name: Set up Python
16+
uses: actions/setup-python@v5
17+
with:
18+
python-version: "3.8"
19+
- name: Install dependencies
20+
run: |
21+
python -m pip install --upgrade pip
22+
pip install beautifulsoup4
23+
- name: Run unit-tests
24+
timeout-minutes: 5
25+
run: |
26+
# Enable pipefail option, so if the tests fail, the job will fail as well
27+
set -o pipefail
28+
python .github/tests.py

0 commit comments

Comments
 (0)