Skip to content

Commit

Permalink
retry
Browse files Browse the repository at this point in the history
  • Loading branch information
dennisbader committed Nov 2, 2024
1 parent 7a0f843 commit b70594a
Show file tree
Hide file tree
Showing 2 changed files with 170 additions and 9 deletions.
14 changes: 5 additions & 9 deletions .github/workflows/develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ jobs:

steps:
- name: "1. Clone repository"
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: "2. Set up Python ${{ matrix.python-version }}"
uses: actions/setup-python@v1
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -28,17 +28,13 @@ jobs:
python -m pip install --upgrade pip
pip install -r requirements/dev-all.txt
- name: "4. Install libomp (for LightGBM)"
run: |
. /.github/scripts/libomp-${{ runner.os }}.sh
- name: "5. Attach cache for pip"
uses: actions/cache@v1
- name: "4. Attach cache for pip"
uses: actions/cache@v4
id: cache
with:
path: ~/.cache/pip
key: tests-${{ runner.os }}-${{ matrix.python-version }}-pip-${{ hashFiles('requirements-latest.txt') }}

- name: "6. Run tests"
- name: "5. Run tests"
run: |
pytest .
165 changes: 165 additions & 0 deletions .github/workflows/develop_old.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
name: darts PR workflow

on:
pull_request:
branches:
- master

jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: "1. Clone repository"
uses: actions/checkout@v2

- name: "2. Set up Python 3.9"
uses: actions/setup-python@v1
with:
python-version: '3.9'

# downloading gradle multiple times in parallel can yield to connection errors
- name: "3. Cache gradle distribution"
uses: actions/cache@v2
with:
path: ~/.gradle/wrapper/dists
key: tests-${{ runner.os }}-gradle-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}

- name: "3.1 Cache gradle packages"
uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: tests-${{ runner.os }}-gradle-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties', 'build.gradle') }}

- name: "4. Lint"
run: |
./gradlew lint
tests:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-13, ubuntu-latest]
python-version: ['3.9']
flavour: ['all']

steps:
- name: "1. Clone repository"
uses: actions/checkout@v2

- name: "2. Set up Python ${{ matrix.python-version }}"
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}

# downloading gradle multiple times in parallel can yield to connection errors
- name: "3. Cache gradle distribution"
uses: actions/cache@v2
with:
path: ~/.gradle/wrapper/dists
key: tests-${{ runner.os }}-gradle-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}

- name: "3.1 Cache gradle packages"
uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: tests-${{ runner.os }}-gradle-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties', 'build.gradle') }}

- name: "4. Setup pip"
run: |
./gradlew installPipLatest
- name: "5. Install libomp (for LightGBM)"
run: |
./.github/scripts/libomp-${{ runner.os }}.sh
- name: "6. Attach cache for pip"
uses: actions/cache@v1
id: cache
with:
path: ~/.cache/pip
key: tests-${{ runner.os }}-${{ matrix.python-version }}-pip-${{ hashFiles('requirements-latest.txt') }}

- name: "7. Tests"
run: |
./gradlew "test_${{matrix.flavour}}"
- name: "8. Codecov upload"
if: ${{ matrix.flavour == 'all' }}
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}

docs:
runs-on: ubuntu-latest
steps:
- name: "1. Clone repository"
uses: actions/checkout@v2

- name: "2. Set up Python 3.9"
uses: actions/setup-python@v1
with:
python-version: '3.9'

- name: "3. Install pandoc"
run: |
sudo apt-get install -y pandoc
# downloading gradle multiple times in parallel can yield to connection errors
- name: "4. Cache gradle distribution"
uses: actions/cache@v2
with:
path: ~/.gradle/wrapper/dists
key: tests-${{ runner.os }}-gradle-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}

- name: "4.1 Cache gradle packages"
uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: tests-${{ runner.os }}-gradle-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties', 'build.gradle') }}

- name: "5. Setup pip"
run: |
./gradlew setupPip
- name: "6. Attach cache for pip"
uses: actions/cache@v1
id: cache
with:
path: ~/.cache/pip
key: tests-${{ runner.os }}-3.9-pip-${{ hashFiles('requirements/core.txt', 'requirements/release.txt') }}

- name: "7. Build docs"
run: |
./gradlew buildDocs
check-examples:
runs-on: ubuntu-latest
strategy:
matrix:
example-name: [03-FFT-examples.ipynb, 04-RNN-examples.ipynb, 00-quickstart.ipynb, 02-data-processing.ipynb, 01-multi-time-series-and-covariates.ipynb]
steps:
- name: "1. Clone repository"
uses: actions/checkout@v2

- name: "2. Set up Python 3.9"
uses: actions/setup-python@v1
with:
python-version: '3.9'

# downloading gradle multiple times in parallel can yield to connection errors
- name: "3. Cache gradle distribution"
uses: actions/cache@v2
with:
path: ~/.gradle/wrapper/dists
key: tests-${{ runner.os }}-gradle-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}

- name: "3.1 Cache gradle packages"
uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: tests-${{ runner.os }}-gradle-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties', 'build.gradle') }}

- name: "4. Run examples ${{matrix.example-name}}"
run: |
./gradlew checkExample -PexampleName=${{matrix.example-name}}

0 comments on commit b70594a

Please sign in to comment.