Skip to content

Commit

Permalink
release: staging into main (#85)
Browse files Browse the repository at this point in the history
* refactor: update libsansmic cpp code (#79)

* refactor: change the way logging is done, make output directories more explicit (not enforced yet)

* style: apply black formatting

* ci: change testing output to use 'tee' instead of redirect

* test: no subprocess test in ipynb on linux

* test: strip metadata by hand from ipynb

* refactor: modify logging output formats

* refactor: move certain elements out of Model into a BaseModel

* refactor(version): move location of version number to avoid circular imports

* refactor(test): fix test to match refactor of license and copyright text names

* release: 1.0.4

Automatically generated by python-semantic-release

* ci: check continuous release testing (#82)

Automatically generated by python-semantic-release

* ci: test separate repo for reusable workflows

* ci: test separate repo for reusable workflows

* ci: test separate repo for reusable workflows

* ci: update continuous testing to include semantic release check

* chore: modify pyproject release branches specification

* ci: update continuous testing to include semantic release check on pyproject.toml modification

* ci: add pull request context to quick test

* ci: remove automatic prerelease tag from pr builds for time being

* ci: update semantic-release workflow for commits to staging

---------

Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: David Hart <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions <[email protected]>

* release: 1.0.5-rc.1

Automatically generated by python-semantic-release

* fix: change TOML config file to use MD (#84)

* ci: test separate repo for reusable workflows

* ci: test separate repo for reusable workflows

* ci: test separate repo for reusable workflows

* ci: update continuous testing to include semantic release check

* chore: modify pyproject release branches specification

* ci: update continuous testing to include semantic release check on pyproject.toml modification

* ci: add pull request context to quick test

* ci: remove automatic prerelease tag from pr builds for time being

* ci: update semantic-release workflow for commits to staging

* fix: depths as true measured depths not as heights from TD_0

* ci: configure semantic-release on staging branch

The semantic-release job will now run on staging and automatically update the version number to the next version and create a new changelog. It will not, however, add a tag or build a release. This may result in a need to synchronize.

---------

Signed-off-by: David Hart <[email protected]>

* chore: update version text to 1.0.5-rc.2

Automatically generated by python-semantic-release

* ci: clean up continuous integration workflows

* ci: fix typo in workflow filename

---------

Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: David Hart <[email protected]>
Co-authored-by: github-actions <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Oct 31, 2024
1 parent 8117c5d commit a6e36bf
Show file tree
Hide file tree
Showing 21 changed files with 251 additions and 353 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
matrix:
version: ["3.9", "3.10", "3.11", "3.12"]
os: [windows-latest, macOS-13, macOS-latest, ubuntu-latest]
uses: sandialabs/sansmic/.github/workflows/pytest-workflow.yml@7952e59342a8c8d1c8ad833121049bac58277167
uses: ./.github/workflows/pytest.yml
with:
version: ${{ matrix.version }}
os: ${{ matrix.os }}
Expand Down
61 changes: 0 additions & 61 deletions .github/workflows/continuous-release.yml

This file was deleted.

14 changes: 10 additions & 4 deletions .github/workflows/continuous-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,23 @@ on:
- src/**
- tests/**
- setup.py
- .github/workflows/continuous-testing.yml
- pyproject.toml
- .github/workflows/*
branches:
- '!main'
- '!staging'
pull_request:
branches:
- '!main'
- '!staging'

permissions:
contents: read

jobs:
quick-test:
uses: sandialabs/sansmic/.github/workflows/pytest-workflow.yml@7952e59342a8c8d1c8ad833121049bac58277167
uses: ./.github/workflows/pytest.yml
with:
version: "3.12"
os: ubuntu-latest
verbose: true
secrets:
coverage_token: ${{ secrets.CODECOV_TOKEN }}
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
name: Reusable test workflow
name: Use pytest to run tests

on:
workflow_call:
inputs:
version:
required: true
required: false
default: '3.12'
type: string
os:
required: true
required: false
default: 'ubuntu-latest'
type: string
verbose:
default: false
Expand All @@ -22,9 +24,9 @@ permissions:

jobs:
run-pytest-coverage:
name: Test and compute coverage
name: pytest and coverarge
runs-on: ${{ inputs.os }}
steps:
steps:
- name: Harden Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
Expand All @@ -49,27 +51,27 @@ jobs:
with:
python-version: ${{ inputs.version }}

- name: Install testing dependencies
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
- name: Test build and install
run: python3 -m pip install .[formats,examples,tests]
- name: Build test
run: python3 -m pip install -e .[formats,examples,tests]

- name: Test with pytest
- name: Test with pytest (quiet)
if: ${{ ! inputs.verbose }}
run: |
python3 -m pytest --nbmake --disable-warnings --cov=sansmic --cov=tests --no-header --color=auto examples/ tests/
- name: Test with pytest (non-windows verbose)
- name: Test with pytest (non-windows, verbose)
if: inputs.verbose && inputs.os != 'windows-latest'
run: |
echo '### Run tests' >> $GITHUB_STEP_SUMMARY
echo '```bash' >> $GITHUB_STEP_SUMMARY
python3 -m pytest --nbmake --disable-warnings --cov=sansmic --cov=tests --no-header --color=auto examples/ tests/ | tee -a $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
- name: Test with pytest (windows verbose)
- name: Test with pytest (windows, verbose)
if: inputs.verbose && inputs.os == 'windows-latest'
shell: powershell
run: |
Expand Down
27 changes: 10 additions & 17 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,6 @@ name: Build - Publish - Release

on:
push:
branches:
- 'main'
- 'executable'
paths-ignore:
- '.github/**'
- '!.github/workflows/release.yml'
- 'docs/**'
- 'examples/**'
tags:
- '*'

Expand Down Expand Up @@ -202,14 +194,14 @@ jobs:
./dist/*.tar.gz
./dist/*.whl
- name: Action | Create GitHub Release
env:
GITHUB_TOKEN: ${{ github.token }}
run: >-
gh release create
'${{ github.ref_name }}'
--repo '${{ github.repository }}'
--notes ""
# - name: Action | Create GitHub Release
# env:
# GITHUB_TOKEN: ${{ github.token }}
# run: >-
# gh release create
# '${{ github.ref_name }}'
# --repo '${{ github.repository }}'
# --notes ""

- name: Action | Upload artifact signatures to GitHub Release
if: success() || failure()
Expand Down Expand Up @@ -242,7 +234,8 @@ jobs:
- name: Zip up dist directory
run: |
cd dist
zip ../sansmic-${{ env.sansmic_version }}-standalone-win_amd64.zip *
zip -r ../sansmic-${{ env.sansmic_version }}-standalone-win_amd64.zip *
cd ..
- name: Action | Sign the dists with Sigstore
uses: sigstore/gh-action-sigstore-python@f514d46b907ebcd5bedc05145c03b69c1edd8b46 # v3.0.0
Expand Down
38 changes: 7 additions & 31 deletions .github/workflows/semantic-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- staging
- main

permissions:
contents: read
Expand All @@ -17,7 +18,6 @@ jobs:
permissions:
id-token: write
contents: write
pull-requests: write

steps:
- name: Harden Runner
Expand All @@ -35,23 +35,13 @@ jobs:
run: |
git checkout -B ${{ github.ref_name }} ${{ github.sha }}
- name: Action | Check if release is needed
id: release
# Adjust tag with desired version if applicable.
uses: python-semantic-release/python-semantic-release@c1bcfdbb994243ac7cf419365d5894d6bfb2950e # v9.12.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
git_committer_name: "github-actions"
git_committer_email: "[email protected]"
build: false
changelog: false
commit: false
push: false
tag: false
vcs_release: false
- name: Setup | Get short commit SHA
id: vars
run: |
echo "short_sha=$(git rev-parse --short HEAD)\n" >> $GITHUB_OUTPUT
- name: Action | Semantic Release - Update version
if: steps.release.outputs.released == 'true'
id: release
# Adjust tag with desired version if applicable.
uses: python-semantic-release/python-semantic-release@c1bcfdbb994243ac7cf419365d5894d6bfb2950e # v9.12.0
with:
Expand All @@ -62,19 +52,5 @@ jobs:
changelog: true
commit: true
push: true
tag: false
tag: true
vcs_release: false

- name: Action | Create Pull Request - Release
if: steps.release.outputs.released == 'true'
run: |
gh pr create -B main -H staging --title "release: Merge into main and create tag as v${{ steps.release.outputs.version }}" --body 'Created by Github action: semantic-release.yml'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Action | Create Pull Request - Chore
if: steps.release.outputs.released == 'false'
run: |
gh pr create -B main -H staging --title 'chore: Merge non-code changes into main' --body 'Created by Github action: semantic-release.yml'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24 changes: 0 additions & 24 deletions .github/workflows/test-linux.yml

This file was deleted.

24 changes: 0 additions & 24 deletions .github/workflows/test-macOS_arm.yml

This file was deleted.

24 changes: 0 additions & 24 deletions .github/workflows/test-macOS_intel.yml

This file was deleted.

24 changes: 0 additions & 24 deletions .github/workflows/test-windows.yml

This file was deleted.

Loading

0 comments on commit a6e36bf

Please sign in to comment.