Update CI/CD pipelines Part 1 #5238
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 virtualenv" | |
uses: actions/cache@v3 | |
id: virtualenv-cache | |
with: | |
path: .venv | |
key: ${{ matrix.os }}-${{ matrix.python-version }}-venv-${{ hashFiles('requirements/*.txt') }} | |
- name: "3. Create virtualenv" | |
if: steps.virtualenv-cache.outputs.cache-hit != 'true' | |
run: | | |
python -m -venv .venv | |
- name: "3. Install Dependencies" | |
run: | | |
# activate and install ALL dependencies (potentially using cached files) | |
source .venv/bin/activate | |
python -m pip install -r requirements/dev-all.txt | |
- name: "4. Install libomp (for LightGBM)" | |
run: | | |
./.github/scripts/libomp-${{ runner.os }}.sh | |
- name: "6. Run tests" | |
run: | | |
pytest . |