PR作成時にpytestを自動で実行させる #7
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test library on pull request into develop | |
on: | |
pull_request | |
jobs: | |
test: | |
name: Test library | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
strategy: | |
fail-fast: false | |
matrix: | |
pyver: ["3.8", "3.9", "3.10"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.pyver }} | |
- name: create venv | |
run: python3 -m venv venv && source venv/bin/activate | |
- name: Build command 1 | |
run: cmake . -DCMAKE_BUILD_TYPE=Release | |
- name: Build command 2 | |
run: cmake --build . -j | |
# Build by poetry | |
- name: Install pip and setuptools wheel | |
run: python3 -m pip install -U pip setuptools wheel | |
- name: Install poetry | |
run: python3 -m pip install poetry | |
# Install packages | |
- name: Install poetry packages | |
run: poetry install | |
# Test | |
- name: pytest | |
run: poetry run pytest | |
- name: qdd_test | |
run: test/qdd_test |