cut v1.23.1 #37
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
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | |
name: Python CI | |
on: | |
push: | |
branches: [main, 1.x] | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
build-and-lint: | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
strategy: | |
matrix: | |
python-version: ['3.9', '3.10'] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Poetry | |
run: | | |
pip install poetry | |
- name: Cache Poetry virtual environment | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cache/pypoetry/virtualenvs | |
key: ${{ runner.os }}-poetry-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }} | |
restore-keys: | | |
${{ runner.os }}-poetry-${{ matrix.python-version }}- | |
${{ runner.os }}-poetry- | |
- name: Install Dependencies | |
run: | | |
poetry install | |
- name: Lint with flake8 | |
run: | | |
poetry run flake8 . | |
integration: | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
strategy: | |
matrix: | |
python-version: ['3.9', '3.10'] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Poetry | |
run: | | |
pip install poetry | |
- name: Cache Poetry virtual environment | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cache/pypoetry/virtualenvs | |
key: ${{ runner.os }}-poetry-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }} | |
restore-keys: | | |
${{ runner.os }}-poetry-${{ matrix.python-version }}- | |
${{ runner.os }}-poetry- | |
- name: Install Dependencies | |
run: | | |
poetry install | |
- name: Run integration tests | |
run: | | |
# Add commands to run integration tests here | |
poetry run python3 test.py tests/integration |