Skip to content

Fix ci.

Fix ci. #4

Workflow file for this run

name: Code Quality
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
PY_COLORS: 1
POETRY_HOME: /opt/poetry
jobs:
lint:
name: Lint and format code
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Cache Poetry
uses: actions/cache@v3
with:
path: $POETRY_HOME
key: poetry-1.7.1
- name: Install Poetry
run: |
python3 -m venv $POETRY_HOME
$POETRY_HOME/bin/pip install poetry==1.7.1
$POETRY_HOME/bin/poetry --version
echo "$POETRY_HOME/bin" >> $GITHUB_PATH
- name: Install Dependencies
run: poetry install --no-interaction --no-root
- uses: actions/cache@v3
with:
path: ~/.cache/pre-commit
key: pre-commit-|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }}
- name: Run pre-commit
run: poetry run pre-commit run -a --verbose --show-diff-on-failure
test:
name: Test pipelines and independent jobs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Cache Poetry
uses: actions/cache@v3
with:
path: $POETRY_HOME
key: poetry-1.7.1
- name: Install Poetry
run: |
python3 -m venv $POETRY_HOME
$POETRY_HOME/bin/pip install poetry==1.7.1
$POETRY_HOME/bin/poetry --version
echo "$POETRY_HOME/bin" >> $GITHUB_PATH
- name: Install Dependencies
run: poetry install --no-interaction --no-root
- name: Copy test config
run: cp params.test.yaml params.yaml
- name: Run pipeline using dvc
run: python3 -m dvc exp run
- name: Run pipeline without dvc
run: python3 scripts/run_pipeline.py