From 33ed56b24e8855d4233537b399d139c1fed74b3e Mon Sep 17 00:00:00 2001 From: Alex Date: Mon, 17 Feb 2025 16:57:12 +0000 Subject: Create main.yml --- .github/workflows/main.yml | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/main.yml (limited to '.github/workflows/main.yml') diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..c1a5e19 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,40 @@ +name: Test and Report Coverage + +on: + pull_request: + branches: + - stable + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + with: + ref: ${{ github.event.pull_request.head.sha }} + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.11' # Adjust to your desired Python version + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install poetry + poetry install + + - name: Run tests with pytest-cov + run: | + poetry run pytest --cov=./ --cov-report=xml:coverage.xml + + - name: Report results to DeepSource + env: + DEEPSOURCE_DSN: ${{ secrets.DEEPSOURCE_DSN }} + run: | + # Install DeepSource CLI + curl https://deepsource.io/cli | sh + # Report coverage results (ensure the path to coverage.xml is correct) + ./bin/deepsource report --analyzer test-coverage --key python --value-file ./coverage.xml -- cgit v1.2.3 From 0a25828ce274dbb8f50766cd2ffd9ec1e894f1dc Mon Sep 17 00:00:00 2001 From: Alex Date: Mon, 17 Feb 2025 16:58:53 +0000 Subject: Update main.yml --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows/main.yml') diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c1a5e19..ab7a260 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -18,7 +18,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: - python-version: '3.11' # Adjust to your desired Python version + python-version: '3.13' - name: Install dependencies run: | -- cgit v1.2.3 From a8127828dd18d37bc510204743c34194090ae675 Mon Sep 17 00:00:00 2001 From: Alex Date: Mon, 17 Feb 2025 16:59:45 +0000 Subject: Update main.yml --- .github/workflows/main.yml | 2 -- 1 file changed, 2 deletions(-) (limited to '.github/workflows/main.yml') diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ab7a260..558c70e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -34,7 +34,5 @@ jobs: env: DEEPSOURCE_DSN: ${{ secrets.DEEPSOURCE_DSN }} run: | - # Install DeepSource CLI curl https://deepsource.io/cli | sh - # Report coverage results (ensure the path to coverage.xml is correct) ./bin/deepsource report --analyzer test-coverage --key python --value-file ./coverage.xml -- cgit v1.2.3