Skip to content

Commit 9849077

Browse files
committed
chore: init examples CI test action
1 parent ae3a427 commit 9849077

File tree

2 files changed

+68
-15
lines changed

2 files changed

+68
-15
lines changed

.github/workflows/tests.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
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.12'}
21+
- {python: '3.11'}
22+
- {python: '3.10'}
23+
- {python: '3.9'}
24+
- {python: '3.8'}
25+
steps:
26+
- name: Checkout Code Repository
27+
uses: actions/checkout@v4
28+
29+
- name: Install GCC and Make
30+
run: |
31+
sudo apt-get update
32+
sudo apt-get install -y build-essential
33+
34+
- name: Set up Python
35+
uses: actions/setup-python@v5
36+
with:
37+
python-version: ${{ matrix.python }}
38+
39+
- name: Install dependencies
40+
run: |
41+
python -m pip install --upgrade pip
42+
pip install poetry
43+
poetry install --with dev
44+
45+
- name: Run Examples Test
46+
run: poetry run pytest -vs -n auto
47+
48+
container-test:
49+
name: GCC Docker Container
50+
runs-on: ubuntu-latest
51+
container:
52+
image: gcc:latest
53+
volumes:
54+
- ${{ github.workspace }}:/app
55+
steps:
56+
- name: Checkout Code Repository
57+
uses: actions/checkout@v4
58+
59+
- name: Install dependencies
60+
run: |
61+
apt-get update
62+
apt-get install -y python3-pip
63+
python3 -m pip install --upgrade pip
64+
pip install poetry --break-system-packages
65+
poetry install --with dev
66+
67+
- name: Run Examples Test
68+
run: poetry run pytest -vs -n auto

requirements.txt

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)