Skip to content

Commit

Permalink
Add poetry for easiness publishing (#11)
Browse files Browse the repository at this point in the history
* Add poetry for easyness publishing

* Update yml tests with poetry

* wtf

* wtf2

* update google auth

* Test aall python versions

* fix 3.10

* remove 3.7 support

* Remove debug useless

* Ensures that only one job runs at a time

* just pytho 3.8
  • Loading branch information
charlielito authored Aug 28, 2024
1 parent 898c15f commit 9199726
Show file tree
Hide file tree
Showing 6 changed files with 937 additions and 41 deletions.
26 changes: 15 additions & 11 deletions .github/workflows/tests.yaml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
name: GitHub CI
on:
push:
# Sequence of patterns matched against refs/heads
branches:
# Push events on master branch
- main
pull_request:
jobs:
Expand All @@ -13,32 +11,38 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7]
# python-version: [3.7, 3.8, 3.9]
python-version: [3.8]
# python-version: [3.8, 3.9, "3.10"]
max-parallel: 1 # Ensures that only one job runs at a time

steps:
- name: Check out the code
uses: actions/checkout@v2
with:
fetch-depth: 1

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install Poetry 1.8.3
run: |
curl -sSL https://install.python-poetry.org | python3 -
export PATH="$HOME/.local/bin:$PATH"
poetry self update 1.8.3
- id: 'auth'
name: 'Authenticate to Google Cloud'
uses: 'google-github-actions/auth@v0'
uses: 'google-github-actions/auth@v2'
with:
credentials_json: '${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}'

- name: Install Dependencies
run: |
pip install -e .
pip install pytest pytest-cov
run: poetry install

- name: Run Tests
# run: pytest test
run: pytest --cov=gcp_io --cov-report=term-missing --cov-report=xml
run: poetry run pytest --cov=gcp_io --cov-report=term-missing --cov-report=xml

- name: Upload coverage
uses: codecov/codecov-action@v2
uses: codecov/codecov-action@v2
4 changes: 2 additions & 2 deletions gcp_io/__init__.py
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from .gcp_interface import GCPInterface
from .utils import write_video, md5sum, read_yaml, signed2gcs
from .utils import md5sum, read_yaml, signed2gcs, write_video

__version__ = "0.0.5"
__version__ = "0.1.0"
Loading

0 comments on commit 9199726

Please sign in to comment.