Skip to content

chore: init examples test action #4

chore: init examples test action

chore: init examples test action #4

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.13'}
- {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 }}
cache: pip
cache-dependency-path: requirements.txt
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -e .
- name: Run Examples Test
run: pytest -vs -n auto
container-test:
name: GCC Docker Container
runs-on: ubuntu-latest
steps:
- name: Checkout Code Repository
uses: actions/checkout@v4
- name: Set up Docker
run: |
docker pull gcc:latest
- name: Run test in Docker
run: |
docker run --rm \
-v ${{ github.workspace }}:/app \
-w /app \
gcc:latest \
sh -c "apt-get update \
&& apt-get install -y python3-pip \
&& pip install -r requirements.txt --break-system-packages \
&& pip install -e . --break-system-packages \
&& pytest -vs -n auto"