Skip to content

Commit 4a1301d

Browse files
committed
chore: init examples test action
1 parent 60e2795 commit 4a1301d

File tree

2 files changed

+85
-0
lines changed

2 files changed

+85
-0
lines changed

.github/workflows/tests.yml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: Examples Test
2+
on:
3+
push:
4+
branches:
5+
- main
6+
- '*.x'
7+
paths-ignore:
8+
- '*.md'
9+
pull_request:
10+
paths-ignore:
11+
- '*.md'
12+
jobs:
13+
local-test:
14+
name: Local-Ubuntu20.04-Python${{ matrix.python }}
15+
runs-on: ubuntu-20.04
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
include:
20+
- {python: '3.13'}
21+
- {python: '3.12'}
22+
- {python: '3.11'}
23+
- {python: '3.10'}
24+
- {python: '3.9'}
25+
- {python: '3.8'}
26+
steps:
27+
- name: Checkout Code Repository
28+
uses: actions/checkout@v4
29+
30+
- name: Install GCC and Make
31+
run: sudo apt-get update && sudo apt-get install -y build-essential
32+
33+
- name: Set up Python
34+
uses: actions/setup-python@v5
35+
with:
36+
python-version: ${{ matrix.python }}
37+
cache: pip
38+
cache-dependency-path: requirements.txt
39+
40+
- name: Install Dependencies
41+
run: |
42+
python -m pip install --upgrade pip
43+
pip install -r requirements.txt
44+
pip install .
45+
46+
- name: Run Examples Test
47+
run: pytest -vs -n auto
48+
49+
container-test:
50+
name: GCC Docker Container
51+
runs-on: ubuntu-latest
52+
steps:
53+
- name: Checkout Code Repository
54+
uses: actions/checkout@v4
55+
56+
- name: Set up Docker
57+
run: |
58+
docker pull gcc:latest
59+
60+
- name: Run test in Docker
61+
run: |
62+
docker run --rm \
63+
-v ${{ github.workspace }}:/app \
64+
-w /app \
65+
gcc:latest \
66+
sh -c "apt-get update \
67+
&& apt-get install -y python3-pip \
68+
&& pip install -r requirements.txt --break-system-packages \
69+
&& pip install . --break-system-packages \
70+
&& pytest -vs -n auto"

requirements.txt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
colorama==0.4.6 ; python_version >= "3.8" and python_version < "4.0" and sys_platform == "win32"
2+
exceptiongroup==1.2.2 ; python_version >= "3.8" and python_version < "3.11"
3+
execnet==2.1.1 ; python_version >= "3.8" and python_version < "4.0"
4+
iniconfig==2.0.0 ; python_version >= "3.8" and python_version < "4.0"
5+
mpmath==1.3.0 ; python_version >= "3.8" and python_version < "4.0"
6+
objprint==0.2.3 ; python_version >= "3.8" and python_version < "4.0"
7+
packaging==24.1 ; python_version >= "3.8" and python_version < "4.0"
8+
pexpect==4.9.0 ; python_version >= "3.8" and python_version < "4.0"
9+
pluggy==1.5.0 ; python_version >= "3.8" and python_version < "4.0"
10+
ptyprocess==0.7.0 ; python_version >= "3.8" and python_version < "4.0"
11+
pytest-xdist==3.6.1 ; python_version >= "3.8" and python_version < "4.0"
12+
pytest==8.3.2 ; python_version >= "3.8" and python_version < "4.0"
13+
sympy==1.13.1 ; python_version >= "3.8" and python_version < "4.0"
14+
toml==0.10.2 ; python_version >= "3.8" and python_version < "4.0"
15+
tomli==2.0.1 ; python_version >= "3.8" and python_version < "3.11"

0 commit comments

Comments
 (0)