Skip to content

Commit

Permalink
Add pip-compile workflow to Github Actions (#2846)
Browse files Browse the repository at this point in the history
* Add pip compile step

Signed-off-by: Ankita Katiyar <ankitakatiyar2401@gmail.com>

* Update pip compile step

Signed-off-by: Ankita Katiyar <ankitakatiyar2401@gmail.com>

* Minor changes to other wfs + Add develop branch

Signed-off-by: Ankita Katiyar <ankitakatiyar2401@gmail.com>

---------

Signed-off-by: Ankita Katiyar <ankitakatiyar2401@gmail.com>
  • Loading branch information
ankatiyar authored Jul 27, 2023
1 parent 3a02aa4 commit 4fc3529
Show file tree
Hide file tree
Showing 7 changed files with 59 additions and 6 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/all-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@ on:
push:
branches:
- main
- develop
paths-ignore:
- "docs/**"
pull_request:
branches:
- main
- develop
paths-ignore:
- "docs/**"

Expand Down Expand Up @@ -42,3 +44,13 @@ jobs:
with:
os: ${{ matrix.os }}
python-version: ${{ matrix.python-version }}

pip-compile:
strategy:
matrix:
os: [ ubuntu-latest, windows-latest ]
python-version: [ "3.7", "3.8", "3.9", "3.10" ]
uses: ./.github/workflows/pip-compile.yml
with:
os: ${{ matrix.os }}
python-version: ${{ matrix.python-version }}
2 changes: 2 additions & 0 deletions .github/workflows/docs-only-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@ on:
push:
branches:
- main
- develop
paths:
- "docs/**"
pull_request:
branches:
- main
- develop
paths:
- "docs/**"

Expand Down
1 change: 0 additions & 1 deletion .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ jobs:
key: ${{inputs.os}}-python-${{inputs.python-version}}
- name: Install dependencies
run: |
pip --version
make install-test-requirements
make install-pre-commit
- name: pip freeze
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ jobs:
run: |
make install-test-requirements
make install-pre-commit
pip freeze
- name: pip freeze
run: pip freeze
- name: Run linter
run: make lint
2 changes: 1 addition & 1 deletion .github/workflows/merge-gatekeeper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}
timeout: 1800
interval: 30
ignored: 'ci/circleci: win_e2e_tests-3.7,ci/circleci: win_pip_compile-3.9,ci/circleci: win_e2e_tests-3.9,ci/circleci: win_pip_compile-3.8,ci/circleci: lint-3.7,ci/circleci: win_pip_compile-3.7,ci/circleci: pip_compile-3.7,ci/circleci: e2e_tests-3.7,ci/circleci: win_unit_tests-3.7,ci/circleci: win_unit_tests-3.9,ci/circleci: e2e_tests-3.8,ci/circleci: win_unit_tests-3.10,ci/circleci: win_pip_compile-3.10,ci/circleci: win_unit_tests-3.8,ci/circleci: e2e_tests-3.9,ci/circleci: unit_tests-3.10,ci/circleci: unit_tests-3.8,ci/circleci: e2e_tests-3.10,ci/circleci: lint-3.8,ci/circleci: unit_tests-3.9,ci/circleci: unit_tests-3.7,ci/circleci: win_e2e_tests-3.10,ci/circleci: pip_compile-3.8,ci/circleci: pip_compile-3.10,ci/circleci: win_e2e_tests-3.8,ci/circleci: lint-3.9,ci/circleci: pip_compile-3.9,ci/circleci: lint-3.10,build_code,ci/circlecici: check-updated-files,regular'
ignored: 'ci/circleci: win_e2e_tests-3.7,ci/circleci: win_pip_compile-3.9,ci/circleci: win_e2e_tests-3.9,ci/circleci: win_pip_compile-3.8,ci/circleci: lint-3.7,ci/circleci: win_pip_compile-3.7,ci/circleci: pip_compile-3.7,ci/circleci: e2e_tests-3.7,ci/circleci: win_unit_tests-3.7,ci/circleci: win_unit_tests-3.9,ci/circleci: e2e_tests-3.8,ci/circleci: win_unit_tests-3.10,ci/circleci: win_pip_compile-3.10,ci/circleci: win_unit_tests-3.8,ci/circleci: e2e_tests-3.9,ci/circleci: unit_tests-3.10,ci/circleci: unit_tests-3.8,ci/circleci: e2e_tests-3.10,ci/circleci: lint-3.8,ci/circleci: unit_tests-3.9,ci/circleci: unit_tests-3.7,ci/circleci: win_e2e_tests-3.10,ci/circleci: pip_compile-3.8,ci/circleci: pip_compile-3.10,ci/circleci: win_e2e_tests-3.8,ci/circleci: lint-3.9,ci/circleci: pip_compile-3.9,ci/circleci: lint-3.10,build_code,ci/circleci: check-updated-files,regular'
39 changes: 39 additions & 0 deletions .github/workflows/pip-compile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Run pip-compile

on:
workflow_call:
inputs:
os:
type: string
python-version:
type: string

jobs:
pip-compile:
runs-on: ${{ inputs.os }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python ${{inputs.python-version}}
uses: actions/setup-python@v3
with:
python-version: ${{inputs.python-version}}
- run: make install-pip-setuptools
- name: Cache python packages for Linux
if: inputs.os == 'ubuntu-latest'
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{inputs.os}}-python-${{inputs.python-version}}
- name: Cache python packages for Windows
if: inputs.os == 'windows-latest'
uses: actions/cache@v3
with:
path: ~\AppData\Local\pip\Cache
key: ${{inputs.os}}-python-${{inputs.python-version}}
- name: Install dependencies
run: |
make install-test-requirements
make install-pre-commit
- name: Run pip-compile
run: make pip-compile
6 changes: 3 additions & 3 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ jobs:
run: pip install tables
- name: pip freeze
run: pip freeze
- name: Run unit tests
- name: Run unit tests sequentially
if: inputs.os == 'ubuntu-latest' && inputs.python-version == '3.10'
run: make test-sequential
- name: Run unit tests
if: inputs.os == 'ubuntu-latest' && inputs.python-version != '3.10'
run: make test
- name: Run unit tests (Windows)
- name: Run unit tests without spark sequentially (Windows)
if: inputs.os == 'windows-latest' && inputs.python-version == '3.10'
run: make test-no-spark-sequential
- name: Run unit tests (Windows)
- name: Run unit tests without spark (Windows)
if: inputs.os == 'windows-latest' && inputs.python-version != '3.10'
run: make test-no-spark

0 comments on commit 4fc3529

Please sign in to comment.