Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dry github workflows #1175

Merged
merged 1 commit into from
Jul 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .github/share-actions/get-bikes-dataset-cached/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Get bikes dataset cached
runs:
using: "composite"
steps:
- uses: actions/cache@v4
id: cache-bikes-dataset
env:
cache-name: cache-bikes-dataset
with:
path: Bike-Sharing-Dataset.zip
key: cache-bikes-dataset
enableCrossOsArchive: true

- name: Download test data
if: ${{ steps.cache-bikes-dataset.outputs.cache-hit != 'true' }}
run: curl -k https://archive.ics.uci.edu/static/public/275/bike+sharing+dataset.zip -o Bike-Sharing-Dataset.zip
shell: bash
22 changes: 7 additions & 15 deletions .github/workflows/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,13 @@ jobs:
fail-fast: false
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v3
id: cache-bikes-dataset
env:
cache-name: cache-bikes-dataset
with:
path: Bike-Sharing-Dataset.zip
key: cache-bikes-dataset
- name: Download test data
if: ${{ steps.cache-bikes-dataset.outputs.cache-hit != 'true' }}
run:
curl -k https://archive.ics.uci.edu/static/public/275/bike+sharing+dataset.zip -o Bike-Sharing-Dataset.zip
- name: Prepare test data
if: ${{ steps.cache-bikes-dataset.outputs.cache-hit != 'true' }}
run:
unzip Bike-Sharing-Dataset.zip -d Bike-Sharing-Dataset

- name: 🔍 Get bikes dataset cached
uses: ./.github/share-actions/get-bikes-dataset-cached

- name: Prepare Bikes dataset
run: unzip Bike-Sharing-Dataset.zip -d Bike-Sharing-Dataset

- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
Expand Down
45 changes: 12 additions & 33 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,16 +87,9 @@ jobs:
needs: changed_files
if: ${{ github.event.pull_request.draft == false && needs.changed_files.outputs.evidently_any_modified == 'true' }}
steps:
- uses: actions/cache@v3
id: cache-bikes-dataset
env:
cache-name: cache-bikes-dataset
with:
path: Bike-Sharing-Dataset.zip
key: cache-bikes-dataset
- name: Download test data
if: ${{ steps.cache-bikes-dataset.outputs.cache-hit != 'true' }}
run: curl -k https://archive.ics.uci.edu/static/public/275/bike+sharing+dataset.zip -o Bike-Sharing-Dataset.zip
- uses: actions/checkout@v4
- name: 🔍 Get bikes dataset cached
uses: ./.github/share-actions/get-bikes-dataset-cached

test-minimal:
name: Test on minimal requirements
Expand All @@ -113,17 +106,10 @@ jobs:
architecture: "x64"
cache: "pip"
cache-dependency-path: requirements.min.txt
- uses: actions/cache@v3
id: cache-bikes-dataset
env:
cache-name: cache-bikes-dataset
with:
path: Bike-Sharing-Dataset.zip
key: cache-bikes-dataset
enableCrossOsArchive: true
- name: Download test data
if: ${{ steps.cache-bikes-dataset.outputs.cache-hit != 'true' }}
run: curl -k https://archive.ics.uci.edu/static/public/275/bike+sharing+dataset.zip -o Bike-Sharing-Dataset.zip

- name: 🔍 Get bikes dataset cached
uses: ./.github/share-actions/get-bikes-dataset-cached

- name: Update pip
run: python -m pip install --upgrade pip
- name: Install minimal dependencies
Expand Down Expand Up @@ -158,23 +144,16 @@ jobs:
architecture: "x64"
cache: "pip"
cache-dependency-path: setup.py
- uses: actions/cache@v3
- uses: actions/cache@v4
id: cache-scipy-data
with:
path: ~/scikit_learn_data
key: cache-scipy-data
enableCrossOsArchive: true
- uses: actions/cache@v3
id: cache-bikes-dataset
env:
cache-name: cache-bikes-dataset
with:
path: Bike-Sharing-Dataset.zip
key: cache-bikes-dataset
enableCrossOsArchive: true
- name: Download test data
if: ${{ steps.cache-bikes-dataset.outputs.cache-hit != 'true' }}
run: curl -k https://archive.ics.uci.edu/static/public/275/bike+sharing+dataset.zip -o Bike-Sharing-Dataset.zip

- name: 🔍 Get bikes dataset cached
uses: ./.github/share-actions/get-bikes-dataset-cached

- name: Install package
run: pip install -e .[dev,spark,fsspec]
- name: Run Tests
Expand Down
Loading