From d040ba2004f53853b2f64a3c54d50a807107f900 Mon Sep 17 00:00:00 2001 From: Ruchi Pakhle Date: Thu, 21 Sep 2023 19:29:30 +0530 Subject: [PATCH 1/4] upgrade codecov action from v3 to v4 --- .github/workflows/test.yml | 33 +++++++++++++++++++++++++++++++++ .github/workflows/tox.yml | 3 ++- 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000000..ed25bcee3b --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,33 @@ +--- +name: tests + +on: + push: + pull_request: + branches: [main] + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: 3.9 + + - name: Install Dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + + - name: Run Tests + run: pytest + + - name: Upload Coverage to Codecov + uses: codecov/codecov-action@v4.0.0-beta.2 + with: + token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/tox.yml b/.github/workflows/tox.yml index ef1b769eb7..466b9cf3a0 100644 --- a/.github/workflows/tox.yml +++ b/.github/workflows/tox.yml @@ -146,7 +146,8 @@ jobs: - name: Upload coverage data if: ${{ startsWith(matrix.passed_name, 'py') }} - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4.0.0-beta.2 + with: name: ${{ matrix.passed_name }} fail_ci_if_error: false # see https://github.com/codecov/codecov-action/issues/598 From 69bafed7e86fc9779b657fa6d4a46bc56f86f2e6 Mon Sep 17 00:00:00 2001 From: Ruchi Pakhle Date: Thu, 21 Sep 2023 19:33:42 +0530 Subject: [PATCH 2/4] test change --- .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 ed25bcee3b..3db11af698 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -22,7 +22,7 @@ jobs: - name: Install Dependencies run: | python -m pip install --upgrade pip - pip install -r requirements.txt + pip install -r .config/requirements.txt - name: Run Tests run: pytest From c62e9e75f4a254746dc0f9f3eab69c0b5feb8ac4 Mon Sep 17 00:00:00 2001 From: Sorin Sbarnea Date: Fri, 22 Sep 2023 15:49:42 +0100 Subject: [PATCH 3/4] Use test environment --- .github/workflows/test.yml | 33 --------------------------------- .github/workflows/tox.yml | 1 + 2 files changed, 1 insertion(+), 33 deletions(-) delete mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index 3db11af698..0000000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,33 +0,0 @@ ---- -name: tests - -on: - push: - pull_request: - branches: [main] - -jobs: - test: - runs-on: ubuntu-latest - - steps: - - name: Checkout Repository - uses: actions/checkout@v4 - - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: 3.9 - - - name: Install Dependencies - run: | - python -m pip install --upgrade pip - pip install -r .config/requirements.txt - - - name: Run Tests - run: pytest - - - name: Upload Coverage to Codecov - uses: codecov/codecov-action@v4.0.0-beta.2 - with: - token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/tox.yml b/.github/workflows/tox.yml index 466b9cf3a0..51cf1d87e8 100644 --- a/.github/workflows/tox.yml +++ b/.github/workflows/tox.yml @@ -50,6 +50,7 @@ jobs: args: .ansible-lint build: name: ${{ matrix.name }} + environment: test runs-on: ${{ matrix.os || 'ubuntu-22.04' }} needs: - pre From d171e41d4a39a62a91a9a4a04731249b23ed32ee Mon Sep 17 00:00:00 2001 From: Sorin Sbarnea Date: Tue, 26 Sep 2023 13:58:39 +0100 Subject: [PATCH 4/4] Enable fail on upload --- .github/workflows/tox.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/tox.yml b/.github/workflows/tox.yml index 51cf1d87e8..e1aaf6479e 100644 --- a/.github/workflows/tox.yml +++ b/.github/workflows/tox.yml @@ -148,10 +148,9 @@ jobs: - name: Upload coverage data if: ${{ startsWith(matrix.passed_name, 'py') }} uses: codecov/codecov-action@v4.0.0-beta.2 - with: name: ${{ matrix.passed_name }} - fail_ci_if_error: false # see https://github.com/codecov/codecov-action/issues/598 + fail_ci_if_error: true # see https://github.com/codecov/codecov-action/issues/598 token: ${{ secrets.CODECOV_TOKEN }} verbose: true # optional (default = false)