Skip to content

Commit

Permalink
Merge pull request #102 from inab/full_circle
Browse files Browse the repository at this point in the history
Further improvements in GitHub actions to shorten check time
  • Loading branch information
jmfernandez committed Jun 19, 2024
2 parents e7fcd41 + 6a464e8 commit 47f7c4d
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 7 deletions.
25 changes: 19 additions & 6 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ jobs:
python-version: [ "3.7", "3.8", "3.9", "3.10", "3.11", "3.12" ]
name: Pre-commit python ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 100
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
Expand All @@ -25,16 +27,27 @@ jobs:
mypy-requirements.txt
dev-requirements.txt
architecture: x64
- name: Changed requirements.txt
id: changed-requirements-txt
uses: tj-actions/changed-files@v44
with:
files: requirements.txt

- name: 'Install requirements (standard)'
if: ${{ matrix.python-version != '3.6' }}
if: ${{ matrix.python-version != '3.6' && steps.changed-requirements-txt.outputs.any_changed == 'true' }}
run: |
pip install --upgrade pip wheel
pip install -r requirements.txt
- name: 'Install requirements (custom Python ${{ matrix.python-version }})'
if: ${{ matrix.python-version == '3.6' }}
- name: 'Install requirements (constraints)'
if: ${{ matrix.python-version != '3.6' && steps.changed-requirements-txt.outputs.any_changed != 'true' }}
run: |
pip install wheel
pip install -r requirements.txt -r requirements-additional-${{ matrix.python-version }}.txt
pip install --upgrade pip wheel
pip install -r requirements.txt -c constraints-${{ matrix.python-version }}.txt
#- name: 'Install requirements (custom Python ${{ matrix.python-version }})'
# if: ${{ matrix.python-version == '3.6' }}
# run: |
# pip install wheel
# pip install -r requirements.txt -r requirements-additional-${{ matrix.python-version }}.txt
- name: 'Freeze Python ${{ matrix.python-version }} constraints'
run: |
pip freeze > constraints-${{ matrix.python-version }}.txt
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/schemas-doc-generator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
needs:
- json-schema-validation
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 100
- name: Install python
Expand Down

0 comments on commit 47f7c4d

Please sign in to comment.