Skip to content

Commit

Permalink
Update workflows and add dependabot yml (#28)
Browse files Browse the repository at this point in the history
* Update workflows and add dependabot yml

* Simplify filter
  • Loading branch information
lauraporta authored Oct 14, 2024
1 parent b8bfe12 commit 64652da
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 8 deletions.
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

version: 2
updates:
- package-ecosystem: "github-actions" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "monthly"
20 changes: 16 additions & 4 deletions .github/workflows/docs_build_and_deploy.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build Sphinx docs and deploy to GitHub Pages
name: Docs

# Generate the documentation on all merges to main, all pull requests, or by
# manual workflow dispatch. The build job can be used as a CI check that the
Expand All @@ -12,23 +12,35 @@ on:
tags:
- '*'
pull_request:
merge_group:
workflow_dispatch:

jobs:
linting:
# scheduled workflows should not run on forks
if: (${{ github.repository_owner == 'neuroinformatics-unit' }}) || (${{ github.event_name != 'schedule' }})
runs-on: ubuntu-latest
steps:
- uses: neuroinformatics-unit/actions/lint@v2

build_sphinx_docs:
name: Build Sphinx Docs
runs-on: ubuntu-latest
steps:
- uses: neuroinformatics-unit/actions/build_sphinx_docs@v2
- uses: neuroinformatics-unit/actions/build_sphinx_docs@main
with:
python-version: 3.11
use-make: true

deploy_sphinx_docs:
name: Deploy Sphinx Docs
needs: build_sphinx_docs
permissions:
contents: write
if: github.event_name == 'push' && github.ref_type == 'tag'
if: (github.event_name == 'push' && github.ref_type == 'tag') || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
steps:
- uses: neuroinformatics-unit/actions/deploy_sphinx_docs@v2
- uses: neuroinformatics-unit/actions/deploy_sphinx_docs@main
with:
secret_input: ${{ secrets.GITHUB_TOKEN }}
use-make: true
12 changes: 8 additions & 4 deletions .github/workflows/test_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
tags:
- '*'
pull_request:
merge_group:

jobs:
linting:
Expand All @@ -27,20 +28,23 @@ jobs:
strategy:
matrix:
# Run all supported Python versions on linux
python-version: ["3.8", "3.9", "3.10"]
python-version: ["3.10", "3.11", "3.12"]
os: [ubuntu-latest]
# Include one windows and macos run
# Include 1 Intel macos (13) and 1 M1 macos (latest) and 1 Windows run
include:
- os: macos-13
python-version: "3.11"
- os: macos-latest
python-version: "3.10"
python-version: "3.11"
- os: windows-latest
python-version: "3.10"
python-version: "3.11"

steps:
# Run tests
- uses: neuroinformatics-unit/actions/test@v2
with:
python-version: ${{ matrix.python-version }}
secret-codecov-token: ${{ secrets.CODECOV_TOKEN }}

build_sdist_wheels:
name: Build source distribution
Expand Down

0 comments on commit 64652da

Please sign in to comment.