Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
cstub committed Jan 14, 2025
1 parent 39f604f commit 3b39b05
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 20 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@ name: Code Quality
on:
push: {}
pull_request:
branches: [main]
branches: [ main ]

jobs:
quality:
quality-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
python-version: ${{ vars.CI_PYTHON_VERSION }}

- name: Run pre-commit
uses: pre-commit/action@v3.0.1
13 changes: 6 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Release Package
on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+*' # Matches all valid semver patterns
- '[0-9]+.[0-9]+.[0-9]+*'

jobs:
release-build:
Expand All @@ -15,20 +15,20 @@ jobs:
fetch-depth: 0
fetch-tags: true

- name: Verify tag is on main branch
- name: Verify current tag is on main branch
run: |
# Exit with error if the tag is not on main
# Exit with error if current tag is not on main
git merge-base --is-ancestor ${{ github.sha }} origin/main || exit 1
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
python-version: ${{ vars.CI_PYTHON_VERSION }}

- name: Install Poetry
uses: abatilo/actions-poetry@v3
with:
poetry-version: 1.8.5
poetry-version: ${{ vars.CI_POETRY_VERSION }}

- name: Install Poetry plugins
run: |
Expand Down Expand Up @@ -57,7 +57,7 @@ jobs:

environment:
name: pypi
url: https://test.pypi.org/p/ipybox
url: https://pypi.org/project/ipybox/

steps:
- name: Retrieve release distributions
Expand All @@ -69,5 +69,4 @@ jobs:
- name: Publish package distributions to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
verbose: true
9 changes: 5 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
name: Tests
name: Run Tests

on:
push: {}
pull_request:
branches: [main]
branches: [ main ]

jobs:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Cache conda
uses: actions/cache@v4
env:
CACHE_NUMBER: 0 # Increase this value to reset cache if environment.yml has not changed
CACHE_NUMBER: 0
with:
path: ~/conda_pkgs_dir
key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{ hashFiles('environment.yml') }}
Expand All @@ -28,7 +29,7 @@ jobs:
- name: Install Poetry
uses: abatilo/actions-poetry@v3
with:
poetry-version: 1.8.5
poetry-version: ${{ vars.CI_POETRY_VERSION }}

- name: Install dependencies
shell: bash -l {0}
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/test_package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Package Installation Tests
on:
push: {}
pull_request:
branches: [main]
branches: [ main ]

jobs:
build:
Expand All @@ -18,12 +18,12 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
python-version: ${{ vars.CI_PYTHON_VERSION }}

- name: Install Poetry
uses: abatilo/actions-poetry@v3
with:
poetry-version: 1.8.5
poetry-version: ${{ vars.CI_POETRY_VERSION }}

- name: Install Poetry plugins
run: |
Expand All @@ -40,8 +40,9 @@ jobs:
path: dist/
retention-days: 1

test-install:
test-package:
needs: build

strategy:
fail-fast: false
matrix:
Expand All @@ -58,7 +59,7 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Download built package
- name: Download package
uses: actions/download-artifact@v4
with:
name: dist
Expand Down Expand Up @@ -98,7 +99,7 @@ jobs:
python -c "import ipybox"
pip uninstall -y ipybox
- name: Smoke test (Ubuntu)
- name: Run smoke test (Linux)
if: runner.os == 'Linux'
run: |
pip install dist/*.whl
Expand Down

0 comments on commit 3b39b05

Please sign in to comment.