Skip to content

Commit

Permalink
gh-11: Initial pipelines test
Browse files Browse the repository at this point in the history
  • Loading branch information
monkeyman192 committed Oct 10, 2024
1 parent e5a4e0f commit 17021f3
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 462 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: pyMHF

on:
# Run on all branches except for the gh-pages branch
push:
paths-ignore:
- '*.md'
branches-ignore:
- 'gh-pages'
pull_request:
paths-ignore:
- '*.md'
branches-ignore:
- 'gh-pages'
create:

jobs:
build_test:
name: Build artefacts
runs-on: Windows-latest
strategy:
fail-fast: false
matrix:
py_ver: [{version: '3.9'}] # , {version: '3.10'}, {version: '3.11'}]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.py_ver.version}}
uses: actions/setup-python@v5
with:
python-version: "${{ matrix.py_ver.version}}"
- name: Install dependencies
run: |
python -m pip install --upgrade pip uv
uv sync --frozen --dev
- name: Build Python ${{ matrix.py_ver.version}} wheel
run: uv build
- name: Lint and format code
run: |
uv run ruff check ./pymhf
uv run ruff format --check ./pymhf
- name: Upload Wheels
uses: actions/upload-artifact@v4
with:
name: pyMHF
path: dist/*
release:
name: Release pyMHF wheels and source build
# Only run this job if the commit was tagged.
if: ${{ startsWith(github.ref, 'refs/tags/') }}
runs-on: windows-latest
needs: [build_test]
steps:
- name: Download files for release
uses: actions/download-artifact@v4
- name: See what files we have
run: ls
shell: bash
# TODO: Add release action
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ pymhf = "pymhf"
dev-dependencies = [
"pytest",
"ruff",
"twine",
]

[tool.ruff]
Expand Down
Loading

0 comments on commit 17021f3

Please sign in to comment.