Skip to content

Commit

Permalink
Create testing pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
Emrys-Merlin committed Sep 7, 2024
1 parent 33beb35 commit 04107db
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# This workflow will install Python dependencies, run tests with a variety of Python versions
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

name: Python package

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build:

runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12"]

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
make setup-ci
- name: Test with pytest
run: |
make test
10 changes: 10 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,13 @@ setup:
.PHONY: test
test:
pytest --cov=web_watchr --cov-report term-missing

.PHONY: setup-ci
setup-ci:
pip install --upgrade pip
pip install uv
pwd
uv venv env
pwd
source env/bin/activate
uv pip install -e ".[dev]"

0 comments on commit 04107db

Please sign in to comment.