Added Pypi action #126
Workflow file for this run
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: Causica CI Build | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
build-linux: | |
runs-on: ubuntu-latest | |
strategy: | |
max-parallel: 5 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: "3.10" | |
- uses: actions/cache@v3 | |
with: | |
path: ~/.cache/pypoetry/virtualenvs | |
key: ${{ hashFiles('poetry.lock') }} | |
id: cache | |
- name: Install poetry | |
run: | | |
curl -sSL https://install.python-poetry.org | python3 - | |
- name: Install dependencies | |
run: | | |
poetry env use 3.10 | |
poetry install | |
if: steps.cache.outputs.cache-hit != 'true' | |
- name: Verify pre-commit checks | |
uses: pre-commit/[email protected] | |
with: | |
extra_args: --all-files | |
- name: Test with pytest | |
run: poetry run python -m pytest ./test | |
- name: Create build artifact | |
run: poetry build | |
- name: Upload build artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Build artifacts | |
path: ./dist | |
retention-days: 90 |