From cf01bfd7389e1e03e5927a8ed9e82ef9b684120d Mon Sep 17 00:00:00 2001 From: Abhijit Paul Date: Thu, 19 Oct 2023 11:44:01 +0530 Subject: [PATCH 1/4] Create test.yml --- .github/workflows/test.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..7157239 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,33 @@ +name: Test +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +permissions: + contents: read + +jobs: + build: + name: Perform tests + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.x' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + - name: Test with Pytest + run: | + pip install pytest pytest-cov + python -m pytest --disable-warnings --doctest-modules --cov=./ --cov-report=xml --cov-report=html + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v3 + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} From 865405a7ada95820a2dfbd75a812d419aab4c184 Mon Sep 17 00:00:00 2001 From: Abhijit Paul Date: Thu, 19 Oct 2023 11:51:22 +0530 Subject: [PATCH 2/4] Update test.yml --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7157239..b8e7046 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,7 +18,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: - python-version: '3.x' + python-version: '3.9.12' - name: Install dependencies run: | python -m pip install --upgrade pip From e3b0745b22933391896acdef97ea6b532fda6fbb Mon Sep 17 00:00:00 2001 From: Abhijit Paul Date: Thu, 19 Oct 2023 11:57:34 +0530 Subject: [PATCH 3/4] Update test.yml --- .github/workflows/test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b8e7046..fb9dbe0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -22,7 +22,8 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install -r requirements.txt + pip install flake8 + if [ -f requirements.txt ]; then pip install -r requirements.txt; - name: Test with Pytest run: | pip install pytest pytest-cov From 6ba06e9170c7879d395d4d1ccaa6c9fead3a6f89 Mon Sep 17 00:00:00 2001 From: Abhijit Paul Date: Thu, 19 Oct 2023 11:59:59 +0530 Subject: [PATCH 4/4] Update test.yml --- .github/workflows/test.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index fb9dbe0..2c0e1bf 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -22,11 +22,10 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install flake8 + pip install pytest pytest-cov if [ -f requirements.txt ]; then pip install -r requirements.txt; - name: Test with Pytest run: | - pip install pytest pytest-cov python -m pytest --disable-warnings --doctest-modules --cov=./ --cov-report=xml --cov-report=html - name: Upload coverage reports to Codecov uses: codecov/codecov-action@v3