From b66bf7bf1eac6c9b0ec3d392b0c7346927a47ae1 Mon Sep 17 00:00:00 2001 From: Nathan Hui Date: Wed, 22 Feb 2023 16:27:22 -0800 Subject: [PATCH 1/2] Added pytest for ^3.8 --- .github/workflows/pytest.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/pytest.yml diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml new file mode 100644 index 0000000..b7b8f35 --- /dev/null +++ b/.github/workflows/pytest.yml @@ -0,0 +1,24 @@ +name: pytest + +on: [push, workflow_dispatch] + +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@v3 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install pytest + pip install . + - name: Test + run: | + python -m pytest tests/ \ No newline at end of file From 8ff8743a476fb5b492decfc8c65ec79ed3e21622 Mon Sep 17 00:00:00 2001 From: Nathan Hui Date: Wed, 22 Feb 2023 16:43:20 -0800 Subject: [PATCH 2/2] Added coverage --- .github/workflows/pytest.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index b7b8f35..ada2b5c 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -17,8 +17,17 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install pytest + pip install pytest coverage pip install . - name: Test run: | - python -m pytest tests/ \ No newline at end of file + coverage run -m pytest tests/ + - name: Generate Report + run: | + coverage html + - name: Upload report + uses: actions/upload-artifact@v3 + with: + name: coverage-report + path: | + htmlcov/* \ No newline at end of file