Skip to content

Concatenate and write Level 4 #358

Concatenate and write Level 4

Concatenate and write Level 4 #358

Workflow file for this run

on:
release:
types: [created]
push:
pull_request:
jobs:
build-from-lock:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install poetry
uses: abatilo/actions-poetry@v2
- name: Setup a local virtual environment (if no poetry.toml file)
run: |
poetry config virtualenvs.create true --local
poetry config virtualenvs.in-project true --local
- uses: actions/cache@v3
name: Define a cache for the virtual environment based on the dependencies lock file
with:
path: ./.venv
key: venv-${{ hashFiles('poetry.lock') }}
- name: Install the project dependencies
run: |
poetry self add "poetry-dynamic-versioning[plugin]"
poetry install
- name: run tests
run: poetry run pytest
- name: build release distributions
run: poetry build
- name: Run pipeline
run: poetry run pydropsonde -c ./dropsonde.cfg
build-from-toml:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install poetry
uses: abatilo/actions-poetry@v2
- name: Setup a local virtual environment (if no poetry.toml file)
run: |
poetry config virtualenvs.create true --local
poetry config virtualenvs.in-project true --local
- uses: actions/cache@v3
name: Define a cache for the virtual environment based on the dependencies lock file
with:
path: ./.venv
key: venv-${{ hashFiles('pyproject.toml') }}
- name: Install the project dependencies
run: |
pip install -e .
pip install pytest
- name: run tests
run: pytest
- name: Run pipeline
run: pydropsonde -c ./dropsonde.cfg
publish-to-PyPI:
if: "${{ github.event_name == 'release' }}"
runs-on: ubuntu-latest
needs: [build-from-lock, build-from-toml]
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install poetry
uses: abatilo/actions-poetry@v2
- name: Setup a local virtual environment (if no poetry.toml file)
run: |
poetry config virtualenvs.create true --local
poetry config virtualenvs.in-project true --local
- uses: actions/cache@v3
name: Define a cache for the virtual environment based on the dependencies lock file
with:
path: ./.venv
key: venv-${{ hashFiles('poetry.lock') }}
- name: Install the project dependencies
run: |
poetry self add "poetry-dynamic-versioning[plugin]"
poetry install
- name: build release distributions
run: poetry build
- name: Publish release distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1