Skip to content

Commit 4076215

Browse files
add workflow file
1 parent 109d10a commit 4076215

File tree

1 file changed

+94
-0
lines changed

1 file changed

+94
-0
lines changed
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
# Do not edit this YAML file. This file is generated automatically by executing
2+
# python scripts/split_tox_gh_actions/split_tox_gh_actions.py
3+
# The template responsible for it is in
4+
# scripts/split_tox_gh_actions/templates/base.jinja
5+
name: Test Integration Deactivation
6+
on:
7+
push:
8+
branches:
9+
- master
10+
- release/**
11+
- major/**
12+
pull_request:
13+
# Cancel in progress workflows on pull_requests.
14+
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value
15+
concurrency:
16+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
17+
cancel-in-progress: true
18+
permissions:
19+
contents: read
20+
env:
21+
BUILD_CACHE_KEY: ${{ github.sha }}
22+
CACHED_BUILD_PATHS: |
23+
${{ github.workspace }}/dist-serverless
24+
jobs:
25+
test-integration_deactivation:
26+
name: Integration Deactivation
27+
timeout-minutes: 30
28+
runs-on: ${{ matrix.os }}
29+
strategy:
30+
fail-fast: false
31+
matrix:
32+
python-version: []
33+
# python3.6 reached EOL and is no longer being supported on
34+
# new versions of hosted runners on Github Actions
35+
# ubuntu-20.04 is the last version that supported python3.6
36+
# see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877
37+
os: [ubuntu-22.04]
38+
# Use Docker container only for Python 3.6
39+
container: ${{ matrix.python-version == '3.6' && 'python:3.6' || null }}
40+
steps:
41+
- uses: actions/[email protected]
42+
- uses: actions/setup-python@v6
43+
if: ${{ matrix.python-version != '3.6' }}
44+
with:
45+
python-version: ${{ matrix.python-version }}
46+
allow-prereleases: true
47+
- name: Setup Test Env
48+
run: |
49+
pip install "coverage[toml]" tox
50+
- name: Erase coverage
51+
run: |
52+
coverage erase
53+
- name: Test integration_deactivation
54+
run: |
55+
set -x # print commands that are executed
56+
./scripts/runtox.sh "py${{ matrix.python-version }}-integration_deactivation"
57+
- name: Generate coverage XML (Python 3.6)
58+
if: ${{ !cancelled() && matrix.python-version == '3.6' }}
59+
run: |
60+
export COVERAGE_RCFILE=.coveragerc36
61+
coverage combine .coverage-sentry-*
62+
coverage xml --ignore-errors
63+
- name: Generate coverage XML
64+
if: ${{ !cancelled() && matrix.python-version != '3.6' }}
65+
run: |
66+
coverage combine .coverage-sentry-*
67+
coverage xml
68+
- name: Upload coverage to Codecov
69+
if: ${{ !cancelled() }}
70+
uses: codecov/[email protected]
71+
with:
72+
token: ${{ secrets.CODECOV_TOKEN }}
73+
files: coverage.xml
74+
# make sure no plugins alter our coverage reports
75+
plugins: noop
76+
verbose: true
77+
- name: Upload test results to Codecov
78+
if: ${{ !cancelled() }}
79+
uses: codecov/test-results-action@v1
80+
with:
81+
token: ${{ secrets.CODECOV_TOKEN }}
82+
files: .junitxml
83+
verbose: true
84+
check_required_tests:
85+
name: All Integration Deactivation tests passed
86+
needs: test-integration_deactivation
87+
# Always run this, even if a dependent job failed
88+
if: always()
89+
runs-on: ubuntu-22.04
90+
steps:
91+
- name: Check for failures
92+
if: needs.test-integration_deactivation.result != 'success'
93+
run: |
94+
echo "One of the dependent jobs has failed. You may need to re-run it." && exit 1

0 commit comments

Comments
 (0)