mirror of
https://github.com/github/octodns.git
synced 2024-05-11 05:55:00 +00:00
Merge pull request #1084 from octodns/python-matrix-json
Try pulling python versions from a json file
This commit is contained in:
4
.ci-config.json
Normal file
4
.ci-config.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"python_version_current": "3.11",
|
||||
"python_versions_active": ["3.8", "3.9", "3.10", "3.11"]
|
||||
}
|
||||
25
.github/workflows/main.yml
vendored
25
.github/workflows/main.yml
vendored
@@ -2,14 +2,29 @@ name: OctoDNS
|
||||
on: [pull_request]
|
||||
|
||||
jobs:
|
||||
config:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
json: ${{ steps.load.outputs.json }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- id: load
|
||||
# based on https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#multiline-strings
|
||||
run: |
|
||||
{
|
||||
echo 'json<<EOF'
|
||||
cat ./.ci-config.json
|
||||
echo EOF
|
||||
} >> $GITHUB_OUTPUT
|
||||
ci:
|
||||
needs: config
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
# Defined in an org level variable, based on dates in
|
||||
# https://devguide.python.org/versions/#versions
|
||||
python-version: ${{fromJson(vars.PYTHON_VERSIONS_ACTIVE)}}
|
||||
# Defined in a file that resides in the top level of octodns/octodns,
|
||||
# based on dates in https://devguide.python.org/versions/#versions
|
||||
python-version: ${{ fromJson(needs.config.outputs.json).python_versions_active }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Setup python
|
||||
@@ -36,13 +51,15 @@ jobs:
|
||||
coverage.xml
|
||||
htmlcov
|
||||
setup-py:
|
||||
needs: config
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Setup python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: ${{ vars.PYTHON_VERSION_CURRENT }}
|
||||
# Most recent release from https://devguide.python.org/versions/#versions
|
||||
python-version: ${{ fromJson(needs.config.outputs.json).python_version_current }}
|
||||
architecture: x64
|
||||
- name: CI setup.py
|
||||
run: |
|
||||
|
||||
17
.github/workflows/modules.yml
vendored
17
.github/workflows/modules.yml
vendored
@@ -5,7 +5,22 @@ on:
|
||||
types: [submitted]
|
||||
|
||||
jobs:
|
||||
config:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
json: ${{ steps.load.outputs.json }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- id: load
|
||||
# based on https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#multiline-strings
|
||||
run: |
|
||||
{
|
||||
echo 'json<<EOF'
|
||||
cat ./.ci-config.json
|
||||
echo EOF
|
||||
} >> $GITHUB_OUTPUT
|
||||
ci:
|
||||
needs: config
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
@@ -46,7 +61,7 @@ jobs:
|
||||
- name: Setup python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: ${{ vars.PYTHON_VERSION_CURRENT }}
|
||||
python-version: ${{ fromJson(needs.config.outputs.json).python_version_current }}
|
||||
architecture: x64
|
||||
- name: Test Module
|
||||
run: |
|
||||
|
||||
Reference in New Issue
Block a user