From 2355d9554262d2ce8a8d7ac7f5baa90a288e56d4 Mon Sep 17 00:00:00 2001 From: Younes B <82935554+fayharinn@users.noreply.github.com> Date: Tue, 9 Apr 2024 04:12:41 +0800 Subject: [PATCH] Create main.yml --- .github/workflows/main.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..bf3861e --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,25 @@ +name: CI +on: [push, pull_request] +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.8' + - name: Install Dependencies + run: | + pip install -r requirements.txt + - name: Run Tests & Generate Coverage Report + run: | + pytest --cov=./ + - name: Upload Coverage to Codecov + uses: codecov/codecov-action@v2 + with: + token: ${{ secrets.CODECOV_TOKEN }} # Not required for public repos + file: ./coverage.xml # Specify the location of the coverage report + flags: unittests # Optional, but useful for categorizing reports + name: codecov-umbrella # Optional, names the report for differentiation in UI + fail_ci_if_error: true # Optional, will fail CI if Codecov runs into an error