From 8878347e71b36fa8272f7432e2ef49235de066bd Mon Sep 17 00:00:00 2001 From: mlanghinrichs <31542107+mauricelanghinrichs@users.noreply.github.com> Date: Wed, 15 Nov 2023 13:52:52 +0100 Subject: [PATCH] tests | CI.yml for github workflow --- .github/workflows/CI.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/CI.yml diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml new file mode 100644 index 0000000..c1a9370 --- /dev/null +++ b/.github/workflows/CI.yml @@ -0,0 +1,35 @@ +name: CI + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +jobs: + build: + + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + python-version: ["3.8", "3.9", "3.10", "3.11"] + + steps: + - uses: actions/checkout@v4 + - name: Setup Python # Set Python version + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + # Install pip and pytest + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + pip install pytest + pip install pytest-cov codecov + - name: Test with pytest + run: | + pytest --cov=memocell --runslow + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v4