Skip to content

Merge pull request #41 from grahitr/issue#39 #56

Merge pull request #41 from grahitr/issue#39

Merge pull request #41 from grahitr/issue#39 #56

Workflow file for this run

## taken from https://jarmos.netlify.app/posts/a-standard-ci-cd-pipeline-for-python-projects/
name: Test-Build
on: [pull_request, push]
jobs:
# linter:
# runs-on: ubuntu-latest
# steps:
# - name: Check out repository
# uses: actions/[email protected]
# - name: Set up python
# uses: actions/setup-python@v2
# - name: Load cache (if exists)
# uses: actions/[email protected]
# with:
# path: ~/.cache/pip
# key: ${{ runner.os }}-pip
# restore-keys: ${{ runner.os }}-pip
# - name: Install Black, Pylint & iSort
# run: python -m pip install black pylint isort
# - name: Run linters
# run: |
# pylint ./src/tidypandas
# black .
# isort .
test:
# needs: linter
strategy:
fail-fast: true
matrix:
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
python-version: ["3.8", "3.9"]
defaults:
run:
shell: bash
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Repository
uses: actions/[email protected]
- name: Set up Python v${{matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version}}
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
- name: Load Cached Virtualenv
id: cached-pip-wheels
uses: actions/[email protected]
with:
path: ~/.cache
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
run: poetry install --no-interaction --no-root -vvv
- name: Install Aurochs
run: poetry install --no-interaction
- name: Run tests
run: |
source $VENV
pytest -vvv
# pytest -vvv --cov-report xml --cov=./
- name: Run build
run: poetry build
#- name: Upload coverage
# uses: codecov/[email protected]
# with:
# token: ${{ secrets.CODECOV_TOKEN }}
# file: coverage.xml
# fail_ci_if_error: true