From 4a881932f770a587f958c2943a5c0f6e80f505c9 Mon Sep 17 00:00:00 2001 From: Edwin Lee Date: Tue, 30 Jul 2024 08:28:32 -0500 Subject: [PATCH] Tidy up action yamls --- .github/workflows/flake8.yml | 15 ++++----------- .github/workflows/release.yml | 23 +++++------------------ .github/workflows/test.yml | 11 +++++++---- 3 files changed, 16 insertions(+), 33 deletions(-) diff --git a/.github/workflows/flake8.yml b/.github/workflows/flake8.yml index 712e656..edb2a07 100755 --- a/.github/workflows/flake8.yml +++ b/.github/workflows/flake8.yml @@ -5,17 +5,10 @@ on: [push] jobs: flake8: runs-on: ubuntu-24.04 - steps: - - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v2 - - - name: Set up Python - uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435 # v4.5.0 + - uses: actions/checkout@v4.1.7 + - uses: actions/setup-python@v5.1.0 with: python-version: 3.12 - - - name: Install Pip Dependencies - run: pip install flake8 - - - name: Run Flake8 - run: flake8 solar_angles + - run: pip install flake8 + - run: flake8 solar_angles diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2f5349a..97b7f9c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,27 +12,14 @@ defaults: jobs: release: runs-on: ubuntu-24.04 - steps: - - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v2 - - - name: Set up Python - uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435 # v4.5.0 + - uses: actions/checkout@v4.1.7 + - uses: actions/setup-python@v5.1.0 with: python-version: 3.12 - - - name: Install Dependencies for Building Wheels - run: pip install wheel - -# - name: Install Dependent Packages -# run: pip install . -# # note that this is not necessary for building the package, it just ensures compatability - - - name: Build the Wheel - run: rm -rf dist/ build/ && python3 setup.py bdist_wheel sdist - - - name: Deploy on Test PyPi - uses: pypa/gh-action-pypi-publish@37f50c210e3d2f9450da2cd423303d6a14a6e29f # v1.5.1 + - run: pip install wheel + - run: python3 setup.py bdist_wheel sdist + - uses: pypa/gh-action-pypi-publish@v1.9.0 with: user: __token__ password: ${{ secrets.PYPIPW }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index efe04ae..b37ebc8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,21 +2,24 @@ name: DevelopmentTest on: [push] +defaults: + run: + shell: bash + jobs: - unit_testing: # not actually running tests, just testing dependencies are compatible + unit_testing: strategy: matrix: os: [ windows-latest, macos-12, ubuntu-24.04 ] py: [ "3.11", "3.12" ] runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v2 + - uses: actions/checkout@v4.1.7 - name: Set up Python - uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435 # v4.5.0 + uses: actions/setup-python@v5.1.0 with: python-version: ${{ matrix.py }} - name: Install Pip Dependencies from Requirements - shell: bash run: pip install -r requirements.txt - name: Run Tests run: coverage run -m pytest && coverage report -m