Skip to content

Fix Redshift vs view definitions #457

Fix Redshift vs view definitions

Fix Redshift vs view definitions #457

Workflow file for this run

# Builds and tests noteable-notebook-magics
name: noteable-notebook-magics Build
# Trigger the workflow on all pull requests and only pushes to the main branch
# yamllint disable-line rule:truthy
on:
push:
branches:
- main
pull_request:
branches:
- main
- feature/*
jobs:
# Runs the build for the noteable-notebook-magics project
build:
runs-on: ubuntu-20.04
strategy:
# By default, GitHub will maximize the number of jobs run in parallel
# depending on the available runners on GitHub-hosted virtual machines.
# max-parallel: 8
fail-fast: false
matrix:
python-version:
- "3.9"
- "3.10"
outputs:
DEPLOY_TAG: ${{ steps.build-args.outputs.SHA_TAG || steps.build-args.outputs.BRANCH_TAG }}
steps:
- name: Checkout the code
uses: actions/checkout@v2
- name: Install poetry
shell: bash
run: curl -sSL https://install.python-poetry.org | POETRY_VERSION=1.4.1 python3 -
- name: Set up Python ${{ matrix.python-version }}
id: setup_python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: poetry
- name: Install dependencies
shell: bash
run: poetry install
- name: Install CockroachDB
uses: ./.github/actions/setup-cockroachdb
# Run all of the tests
- name: Flake8 - Style guide enforcement
run: poetry run flake8 noteable/ tests/ --count --show-source --statistics --benchmark
- name: Black - Format check
run: poetry run black --diff noteable/ tests/
- name: Isort - Import format check
run: poetry run isort --diff --check noteable/ tests/
- name: Safety - Python dependency vulnerability check
run: poetry export --without-hashes -f requirements.txt | poetry run safety check --stdin -i 51457 -i 51668
- name: Set env
id: vars
run: PY_VER=${{ matrix.python-version }}; echo ::set-output name=tox_py::${PY_VER//.}
- name: Install tox for running tests with
run: pip install tox
- name: Pytest - Unit tests
run: tox -e py${{ steps.vars.outputs.tox_py }}