Skip to content

chore: init examples CI test action #13

chore: init examples CI test action

chore: init examples CI test action #13

Workflow file for this run

name: Examples Test
on:
push:
branches:
- main
- '*.x'
paths-ignore:
- '*.md'
pull_request:
paths-ignore:
- '*.md'
jobs:
local-test:
name: Local-Ubuntu20.04-Python${{ matrix.python }}
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
include:
- {python: '3.12'}
- {python: '3.11'}
- {python: '3.10'}
- {python: '3.9'}
- {python: '3.8'}
steps:
- name: Checkout Code Repository
uses: actions/checkout@v4
- name: Install GCC and Make
run: |
sudo apt-get update
sudo apt-get install -y build-essential
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
poetry install --with dev
- name: Run Examples Test
run: poetry run pytest -vs -n auto
container-test:
name: GCC Docker Container
runs-on: ubuntu-latest
container:
image: gcc:latest
volumes:
- ${{ github.workspace }}:/app
steps:
- name: Set up Python Package
run: |
apt-get update
apt-get install -y python3-pip
pip install -r requirements/build.txt --break-system-packages
pip install -r requirements/tests.txt --break-system-packages
pip install . --break-system-packages
- name: Run test in Docker
run: pytest -vs -n auto