Skip to content

Commit

Permalink
Create ci.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
alan890104 authored Sep 9, 2023
1 parent 31b79b1 commit 5472e55
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Python PyTest Matrix

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]

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
uses: snok/install-poetry@v1
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v3
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
- name: Install project
run: poetry install --no-interaction
- name: Run tests
run: |
source .venv/bin/activate
pytest tests/
coverage report

0 comments on commit 5472e55

Please sign in to comment.