Skip to content

ci(check): fix order #26

ci(check): fix order

ci(check): fix order #26

Workflow file for this run

name: CI/CD Checks
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
python-version: ['3.9', '3.10', '3.11']
steps:
# Environment Setup
- name: Checkout code
uses: actions/checkout@v3
# Tool Installation
- name: Load cached tool installations
id: cached-tools
uses: actions/cache@v3
with:
path: ~/.local/bin # the path depends on the OS
key: tools-${{ matrix.python-version }}-1 # Increment cache key to clear cache
- name: Install Poetry
if: steps.cached-tools.outputs.cache-hit != 'true'
uses: snok/install-poetry@v1
- name: Install Task
run: |
sudo sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b /usr/local/bin
# Dependency Installation
# - name: Load cached venv
# id: cached-poetry-dependencies
# uses: actions/cache@v3
# with:
# path: ~/.cache/pypoetry/virtualenvs
# key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
# - name: Install dependencies
# if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
# run: poetry install --no-interaction --no-root
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: poetry
cache-dependency-path: poetry.lock
- name: Install library
run: poetry install --no-interaction --no-root
# CI/CD Checks
- name: Run CI-CD-checks
run: poetry run task ci-cd-checks
- name: Upload coverage reports to Codecov
if: matrix.python-version == '3.11'
uses: codecov/codecov-action@v3
env:
fail_ci_if_error: true