From 8150c7e561c8261771ca968b4ef4553ad12739b8 Mon Sep 17 00:00:00 2001 From: Markus Semmler Date: Wed, 10 Jan 2024 16:32:18 +0100 Subject: [PATCH] Fix CI. --- .github/workflows/ci.yaml | 53 ++++++++++++++++++++++++++++++++++----- 1 file changed, 47 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index a36b3a04..9e0a5fcf 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -28,12 +28,12 @@ jobs: uses: actions/cache@v3 with: path: $POETRY_HOME - key: poetry-1.2.0 + key: poetry-1.7.1 - name: Install Poetry run: | python3 -m venv $POETRY_HOME - $POETRY_HOME/bin/pip install poetry==1.2.0 + $POETRY_HOME/bin/pip install poetry==1.7.1 $POETRY_HOME/bin/poetry --version echo "$POETRY_HOME/bin" >> $GITHUB_PATH @@ -45,7 +45,8 @@ jobs: key: poetry-${{ hashFiles('**/poetry.lock') }} - name: Install Dependencies - run: poetry install --no-interaction --no-root --only dev + run: poetry install --no-interaction --no-root + - uses: actions/cache@v3 with: path: ~/.cache/pre-commit @@ -54,7 +55,47 @@ jobs: - name: Run pre-commit run: poetry run pre-commit run -a --verbose --show-diff-on-failure - - name: Copy test config and run test pipeline + test: + 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: | - cp params.test.yaml params.yaml - python scripts/run_pipeline.py + 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: Cache Dependencies + id: cache-deps + uses: actions/cache@v3 + with: + path: ~/.virtualenvs + key: poetry-${{ hashFiles('**/poetry.lock') }} + + - name: Install Dependencies + run: poetry install --no-interaction --no-root + + - name: Copy test config + run: cp params.test.yaml params.yaml + + - name: Run pipeline without dvc + run: python scripts/run_pipeline.py + + - name: Run pipeline using dvc + run: dvc exp run