deltares/rtc-tools #39
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: deltares/rtc-tools | |
on: | |
push: | |
workflow_dispatch: | |
concurrency: | |
group: "${{ github.ref }}" | |
cancel-in-progress: true | |
# env: | |
# CODECOV_TOKEN: "${{ secrets.CODECOV_TOKEN}}" | |
jobs: | |
# style: | |
# runs-on: ubuntu-latest | |
# timeout-minutes: 30 | |
# steps: | |
# - uses: actions/checkout@v4 | |
# - run: pip install pre-commit | |
# - run: pre-commit run --all-files --show-diff-on-failure | |
build: | |
# needs: style | |
runs-on: ubuntu-latest | |
container: | |
image: python:3.9 | |
timeout-minutes: 30 | |
steps: | |
- uses: actions/[email protected] | |
with: | |
# Fetch all tags/branches in order to obtain the correct version. | |
fetch-depth: 0 | |
- run: python -c "import rtctools; print(rtctools.__version__)" | |
- run: python setup.py sdist bdist_wheel | |
- uses: actions/upload-artifact@v4 | |
if: success() | |
with: | |
name: "rtc-tools-distribution" | |
retention-days: 7 | |
path: dist/ | |
# test-linux: | |
# needs: build | |
# runs-on: ubuntu-latest | |
# container: | |
# image: python:${{ matrix.version }} | |
# timeout-minutes: 30 | |
# env: | |
# TOXENV: py | |
# strategy: | |
# matrix: | |
# version: | |
# - '3.9' | |
# - '3.10' | |
# - '3.11' | |
# steps: | |
# - uses: actions/checkout@v4 | |
# - run: pip install tox | |
# - run: tox -vv | |
# coverage: | |
# needs: test-linux | |
# runs-on: ubuntu-latest | |
# container: | |
# image: python:3.9 | |
# timeout-minutes: 30 | |
# env: | |
# TOXENV: coverage | |
# steps: | |
# - uses: actions/[email protected] | |
# - run: pip install tox | |
# - run: tox -vv | |
# # - run: pip install codecov | |
# # - run: codecov --token=$CODECOV_TOKEN | |
# examples-linux: | |
# needs: coverage | |
# runs-on: ubuntu-latest | |
# container: | |
# image: python:${{ matrix.version }} | |
# if: startsWith(github.ref, 'refs/tags') | |
# timeout-minutes: 30 | |
# env: | |
# TOXENV: examples | |
# strategy: | |
# matrix: | |
# version: | |
# - '3.9' | |
# - '3.10' | |
# - '3.11' | |
# steps: | |
# - uses: actions/[email protected] | |
# - run: pip install tox | |
# - run: tox -vv | |
deploy: | |
needs: build | |
runs-on: ubuntu-latest | |
container: | |
image: python:3.9 | |
# Only publish tag references that start with "2.". | |
if: startsWith(github.ref, 'refs/tags/2.') | |
timeout-minutes: 30 | |
permissions: | |
id-token: write | |
steps: | |
- uses: actions/[email protected] | |
- uses: actions/[email protected] | |
with: | |
name: "rtc-tools-distribution" | |
path: dist/ | |
- uses: pypa/gh-action-pypi-publish@release/v1 |