Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
version: 2
# update once a week, with a 7-day cooldown
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
cooldown:
default-days: 7
40 changes: 27 additions & 13 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
---
permissions:
contents: read
name: main
concurrency:
group: ${{ github.head_ref || github.run_id }}
Expand All @@ -22,8 +24,10 @@ jobs:
- '313'
- '314'
steps:
- uses: actions/checkout@v4
- uses: prefix-dev/setup-pixi@v0.9.4
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
persist-credentials: false
- uses: prefix-dev/setup-pixi@a0af7a228712d6121d37aba47adf55c1332c9c2e # v0.9.4
with:
pixi-version: v0.65.0
cache: true
Expand All @@ -35,7 +39,7 @@ jobs:
run: pixi run -e tests-linux-py${{ matrix.python-version }} tests-with-cov
- name: Upload coverage report.
if: matrix.python-version == '312'
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4.6.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
run-tests-win-and-mac:
Expand All @@ -52,8 +56,10 @@ jobs:
- '313'
- '314'
steps:
- uses: actions/checkout@v4
- uses: prefix-dev/setup-pixi@v0.9.4
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
persist-credentials: false
- uses: prefix-dev/setup-pixi@a0af7a228712d6121d37aba47adf55c1332c9c2e # v0.9.4
with:
pixi-version: v0.65.0
cache: true
Expand All @@ -67,8 +73,10 @@ jobs:
name: Run tests on ubuntu-latest with plotly < 6
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: prefix-dev/setup-pixi@v0.9.4
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
persist-credentials: false
- uses: prefix-dev/setup-pixi@a0af7a228712d6121d37aba47adf55c1332c9c2e # v0.9.4
with:
pixi-version: v0.65.0
cache: true
Expand All @@ -89,8 +97,10 @@ jobs:
- '313'
- '314'
steps:
- uses: actions/checkout@v4
- uses: prefix-dev/setup-pixi@v0.9.4
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
persist-credentials: false
- uses: prefix-dev/setup-pixi@a0af7a228712d6121d37aba47adf55c1332c9c2e # v0.9.4
with:
pixi-version: v0.65.0
cache: true
Expand All @@ -106,8 +116,10 @@ jobs:
name: Run code snippets in documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: prefix-dev/setup-pixi@v0.9.4
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
persist-credentials: false
- uses: prefix-dev/setup-pixi@a0af7a228712d6121d37aba47adf55c1332c9c2e # v0.9.4
with:
pixi-version: v0.65.0
cache: true
Expand All @@ -123,8 +135,10 @@ jobs:
name: Run mypy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: prefix-dev/setup-pixi@v0.9.4
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
persist-credentials: false
- uses: prefix-dev/setup-pixi@a0af7a228712d6121d37aba47adf55c1332c9c2e # v0.9.4
with:
pixi-version: v0.65.0
cache: true
Expand Down
37 changes: 29 additions & 8 deletions .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,17 @@
name: PyPI
on: push
jobs:
build-n-publish:
name: Build and publish optimagic Python 🐍 distributions 📦 to PyPI
build:
name: Build distribution
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
persist-credentials: false
- name: Set up Python 3.12
uses: actions/setup-python@v5
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: '3.12'
- name: Install pypa/build
Expand All @@ -24,8 +28,25 @@ jobs:
--sdist
--wheel
--outdir dist/
- name: Publish distribution 📦 to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
- name: Upload distribution artifacts
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: dist
path: dist
publish:
name: Publish to PyPI
if: startsWith(github.ref, 'refs/tags')
needs: build
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- name: Download distribution artifacts
# yamllint disable-line rule:line-length
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
password: ${{ secrets.PYPI_API_TOKEN_OPTIMAGIC }}
name: dist
path: dist
- name: Publish distribution to PyPI
# yamllint disable-line rule:line-length
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0
Loading