Use poetry as the build tool and apply linting & styling (#4) #10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
env: | |
POETRY_HOME: "/opt/poetry" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: set up python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.9 | |
- name: install poetry | |
run: | | |
python3 -m venv $POETRY_HOME | |
$POETRY_HOME/bin/pip install poetry==1.7.1 | |
$POETRY_HOME/bin/poetry --version | |
- name: add poetry to path | |
run: echo "${POETRY_HOME}/bin" >> $GITHUB_PATH | |
- name: install dependencies and build | |
run: poetry install | |
- name: run tests | |
run: poetry run pytest | |
- name: build image | |
run: docker build . --platform linux/amd64 --file Dockerfile --tag neo4j-bigquery-connector:$(date +%s) |