From 650741f99bfd4cd4edb6a7f25e876938949b0506 Mon Sep 17 00:00:00 2001 From: Carlos Date: Thu, 19 Sep 2024 20:40:36 -0700 Subject: [PATCH] Test New API V1.2.0a1 (#147) * new dep - using the new dep. * Update build_and_publish_to_test_pypi.yml - make it check for new files * Update behave_tests.yml - adding file check * Update setup.cfg - bumping to a test version. --- .github/workflows/behave_tests.yml | 19 +++++++++++++++++ .../build_and_publish_to_test_pypi.yml | 21 +++++++++++++++++-- .gitignore | 4 ++-- setup.cfg | 4 ++-- 4 files changed, 42 insertions(+), 6 deletions(-) diff --git a/.github/workflows/behave_tests.yml b/.github/workflows/behave_tests.yml index ee76407..6449d39 100644 --- a/.github/workflows/behave_tests.yml +++ b/.github/workflows/behave_tests.yml @@ -9,9 +9,28 @@ on: branches: [ main ] jobs: + check-source-changes: + runs-on: ubuntu-latest + outputs: + run_job: ${{ steps.changed-files.outputs.any_changed }} + steps: + - name: Checkout Sourcecode + uses: actions/checkout@v4 + + - name: Check for changes in setup.py/cfg + id: changed-files + uses: tj-actions/changed-files@v45.0.2 + with: + files: | + purpleair_data_logger/*.py + setup.py + setup.cfg + build-and-test: name: ${{ matrix.os }} using Python ${{ matrix.python-version }} runs-on: ${{ matrix.os }} + needs: check-source-changes + if: needs.check-source-changes.outputs.run_job == 'true' strategy: fail-fast: false matrix: diff --git a/.github/workflows/build_and_publish_to_test_pypi.yml b/.github/workflows/build_and_publish_to_test_pypi.yml index 2f8f75c..3b79ea0 100644 --- a/.github/workflows/build_and_publish_to_test_pypi.yml +++ b/.github/workflows/build_and_publish_to_test_pypi.yml @@ -3,15 +3,32 @@ name: TestPyPI Distributions concurrency: build_and_publish_to_test_pypi - on: push: branches: [ main ] jobs: + check-source-changes: + runs-on: ubuntu-latest + outputs: + run_job: ${{ steps.changed-files.outputs.any_changed }} + steps: + - name: Checkout Sourcecode + uses: actions/checkout@v4 + + - name: Check for changes in setup.py/cfg + id: changed-files + uses: tj-actions/changed-files@v45.0.2 + with: + files: | + setup.py + setup.cfg + build-n-publish-test-pypi: - name: Build and Publish + name: Build and Publish To Test PyPi runs-on: ubuntu-latest + needs: check-source-changes + if: needs.check-source-changes.outputs.run_job == 'true' steps: - uses: actions/checkout@v4 diff --git a/.gitignore b/.gitignore index c1e8a87..d1899d0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,4 @@ **/.pyc/** -**/.DS_Store/** **/dist/** **/build/** **/__pycache__/** @@ -7,4 +6,5 @@ **/logs/** **.ini **.xml -.DS_Store \ No newline at end of file +**.DS_Store** +**venv** \ No newline at end of file diff --git a/setup.cfg b/setup.cfg index 4832f9b..211870b 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = purpleair_data_logger -version = 1.3.3 +version = 1.4.0a1 license = MIT author = Carlos Santos author_email = dose.lucky.sake@cloak.id @@ -27,5 +27,5 @@ packages = purpleair_data_logger install_requires = pg8000==1.31.2 requests - purpleair_api==1.1.4 + purpleair_api==1.2.0a1 python_requires = >=3.8