Update CI/CD pipelines Part 1 #5240
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: darts PR workflow | |
on: | |
pull_request: | |
branches: | |
- master | |
jobs: | |
tests: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [macos-13] | |
python-version: ['3.9'] | |
flavour: ['all'] | |
steps: | |
- name: "1. Clone repository" | |
uses: actions/checkout@v4 | |
- name: "2. Set up Python ${{ matrix.python-version }}" | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: "3. Cache python environment" | |
uses: actions/cache@v3 | |
id: virtualenv-cache | |
with: | |
path: ${{ env.pythonLocation }} | |
key: ${{ matrix.os }}-${{ env.pythonLocation }}-${{ hashFiles('requirements/*.txt') }} | |
- name: "3.1. (No-Cache) Setup Pip" | |
if: steps.virtualenv-cache.outputs.cache-hit != 'true' | |
run: | | |
python -m pip install --upgrade pip | |
- name: "4. Install Dependencies" | |
run: | | |
# install latest dependencies (potentially using cached files) | |
pip install -U -r requirements/dev-all.txt | |
- name: "5. Install libomp (for LightGBM)" | |
run: | | |
./.github/scripts/libomp-${{ runner.os }}.sh | |
- name: "6. Run tests" | |
run: | | |
pytest . |