Skip to content

ci: Add github workflows #2

ci: Add github workflows

ci: Add github workflows #2

Workflow file for this run

name: Main workflow
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Setup Pixi
uses: prefix-dev/[email protected]
with:
pixi-version: v0.25.0
environments: build
- name: Build
run: pixi run build
- name: Upload distributions
uses: actions/upload-artifact@v4
with:
name: release-dists
path: dist/
qa:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Setup Pixi
uses: prefix-dev/[email protected]
with:
pixi-version: v0.25.0
environments: qa
- name: Install QA
run: pixi run qa-install
- name: Run QA
run: pixi run qa-ci
simpletests:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Setup Pixi
uses: prefix-dev/[email protected]
with:
pixi-version: v0.25.0
environments: self
- name: Run Simple Tests
shell: pixi run -e self bash -e {0}
run: |
gridtk --help
gridtk submit --help
gridtk resubmit --help
gridtk stop --help
gridtk list --help
gridtk report --help
gridtk delete --help
tests:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Setup Pixi
uses: prefix-dev/[email protected]
with:
pixi-version: v0.25.0
environments: test
- name: Run Tests
run: pixi run test-ci
doc:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Setup Pixi
uses: prefix-dev/[email protected]
with:
pixi-version: v0.25.0
environments: doc
- name: Clean previous docs
run: pixi run doc-clean
- name: Build docs
run: pixi run doc
- name: Run doctests
run: pixi run doctest
pypi-publish:
runs-on: ubuntu-22.04
needs:
- build
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
# Dedicated environments with protections for publishing are strongly recommended.
environment:
name: pypi
# include the PyPI project URL in the deployment status:
url: https://pypi.org/p/gridtk
steps:
- name: Retrieve release distributions
uses: actions/download-artifact@v4
with:
name: release-dists
path: dist/
- name: Publish release distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1