-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (29 loc) · 1.06 KB
/
Copy pathtests.yml
File metadata and controls
37 lines (29 loc) · 1.06 KB
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
name: Tests
# Runs on every push and pull request — meaning GitHub itself, without
# anyone touching anything by hand, runs the tests every time and shows
# the result on the repo page (with a green ✅ tick or a red ❌ cross).
on:
push:
pull_request:
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Check out the code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install dependencies
run: pip install -r requirements.txt
- name: Run tests with the plain backend (subprocess)
run: python -m unittest discover tests -v
# GitHub Actions machines already have Docker installed —
# no need to manually install Docker here.
- name: Pull the Python image for the Docker backend
run: docker pull python:3.12-slim
- name: Run tests with the Docker backend (industry-standard isolation level)
run: python -m unittest discover tests -v
env:
SANDBOX_BACKEND: docker