Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Build and publish pypi package

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: 3.11.1
- name: Install poetry
uses: abatilo/actions-poetry@v2
with:
poetry-version: 1.2.2
- name: Configure poetry
# TODO (mis): add this secret to your repository
run: |
poetry config virtualenvs.create false
poetry config pypi-token.pypi ${{ SECRETS.PYPI_TOKEN }}
Comment on lines +23 to +26
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to set this secret up from PYPI @mearlboro

#----------------------------------------------
# load cached venv if cache exists
#----------------------------------------------
- name: Load cached venv
id: cached-dependencies
uses: actions/cache@v3
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('poetry.lock') }}
#----------------------------------------------
# install dependencies if cache does not exist
#----------------------------------------------
- name: Install dependencies
if: steps.cached-dependencies.outputs.cache-hit != 'true'
run: |
poetry install
- name: Run Tests
run: |
pytest
- name: Build and publish
if: github.ref == 'refs/heads/main'
run: |
poetry publish --build
146 changes: 0 additions & 146 deletions flock/main.py

This file was deleted.

Loading