Skip to content

Commit

Permalink
Add GitHub action to Build&Test
Browse files Browse the repository at this point in the history
  • Loading branch information
david-chapela committed Jul 9, 2024
1 parent 9ee7988 commit d8d4389
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Build & Test

on:
workflow_dispatch:
push:
branches: [ main ]
paths:
- 'src/**'
- 'tests/**'
- '.github/workflows/**'
pull_request:
branches: [ main ]
paths:
- 'src/**'
- 'tests/**'
- '.github/workflows/**'

jobs:
build:
name: Build and test, Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write
packages: write
strategy:
matrix:
python-version: [ '3.9' , '3.10' , '3.11' ]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
architecture: x64

- name: Install poetry
shell: bash
run: pip install poetry

- name: Install project
run: |
poetry install
- name: Test
run: |
poetry run pytest

0 comments on commit d8d4389

Please sign in to comment.