-
Notifications
You must be signed in to change notification settings - Fork 522
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: Generate Flags tox entries with toxgen script (#3974)
- remove hardcoded entries for `openfeature`, `launchdarkly`, `statsig`, and `unleash` from the tox template - remove them from the ignore list in `populate_tox.py` - run `populate_tox.py` to fill in entries for them - run `split_gh_tox_actions.py` to generate the CI yaml files so that they correspond to the new `tox.ini` Note that this effectively eliminates the `-latest` tests for the Flags group. The script doesn't generate any `-latest` tests since it always makes sure to add a pinned entry for the latest version. So in case all of the integrations in a single group are using the script, the whole `-latest` test category is removed.
- Loading branch information
1 parent
5a66a04
commit 5a5a1cf
Showing
5 changed files
with
47 additions
and
141 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,82 +22,14 @@ env: | |
CACHED_BUILD_PATHS: | | ||
${{ github.workspace }}/dist-serverless | ||
jobs: | ||
test-flags-latest: | ||
name: Flags (latest) | ||
timeout-minutes: 30 | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.8","3.12","3.13"] | ||
# python3.6 reached EOL and is no longer being supported on | ||
# new versions of hosted runners on Github Actions | ||
# ubuntu-20.04 is the last version that supported python3.6 | ||
# see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877 | ||
os: [ubuntu-20.04] | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
allow-prereleases: true | ||
- name: Setup Test Env | ||
run: | | ||
pip install "coverage[toml]" tox | ||
- name: Erase coverage | ||
run: | | ||
coverage erase | ||
- name: Test launchdarkly latest | ||
run: | | ||
set -x # print commands that are executed | ||
./scripts/runtox.sh "py${{ matrix.python-version }}-launchdarkly-latest" | ||
- name: Test openfeature latest | ||
run: | | ||
set -x # print commands that are executed | ||
./scripts/runtox.sh "py${{ matrix.python-version }}-openfeature-latest" | ||
- name: Test statsig latest | ||
run: | | ||
set -x # print commands that are executed | ||
./scripts/runtox.sh "py${{ matrix.python-version }}-statsig-latest" | ||
- name: Test unleash latest | ||
run: | | ||
set -x # print commands that are executed | ||
./scripts/runtox.sh "py${{ matrix.python-version }}-unleash-latest" | ||
- name: Generate coverage XML (Python 3.6) | ||
if: ${{ !cancelled() && matrix.python-version == '3.6' }} | ||
run: | | ||
export COVERAGE_RCFILE=.coveragerc36 | ||
coverage combine .coverage-sentry-* | ||
coverage xml --ignore-errors | ||
- name: Generate coverage XML | ||
if: ${{ !cancelled() && matrix.python-version != '3.6' }} | ||
run: | | ||
coverage combine .coverage-sentry-* | ||
coverage xml | ||
- name: Upload coverage to Codecov | ||
if: ${{ !cancelled() }} | ||
uses: codecov/[email protected] | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
files: coverage.xml | ||
# make sure no plugins alter our coverage reports | ||
plugin: noop | ||
verbose: true | ||
- name: Upload test results to Codecov | ||
if: ${{ !cancelled() }} | ||
uses: codecov/test-results-action@v1 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
files: .junitxml | ||
verbose: true | ||
test-flags-pinned: | ||
name: Flags (pinned) | ||
timeout-minutes: 30 | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.8","3.12","3.13"] | ||
python-version: ["3.7","3.8","3.9","3.12","3.13"] | ||
# python3.6 reached EOL and is no longer being supported on | ||
# new versions of hosted runners on Github Actions | ||
# ubuntu-20.04 is the last version that supported python3.6 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters