Skip to content

Commit

Permalink
Update to SINTEF/ci-cd v2 (#105)
Browse files Browse the repository at this point in the history
Use the currently latest v2.2.1.
Update how inputs are listed for CI/CD workflows.

Remove safety ignore for NumPy.
This issue has been fixed. See
numpy/numpy#19038
for more information.
  • Loading branch information
CasperWA committed Mar 15, 2023
1 parent 2af7f18 commit e6d6a45
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 18 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/cd_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,29 @@ on:

jobs:
publish-package-and-docs:
name: Call external workflow
uses: SINTEF/ci-cd/.github/workflows/cd_release.yml@v1
name: External
uses: SINTEF/ci-cd/.github/workflows/cd_release.yml@v2.2.1
if: github.repository == 'SINTEF/oteapi-optimade' && startsWith(github.ref, 'refs/tags/v')
with:
# General
git_username: "TEAM 4.0[bot]"
git_email: "Team4.0@SINTEF.no"

# Python package
python_package: true
package_dirs: oteapi_optimade
release_branch: main
install_extras: "[dev]"
python_version_build: "3.9"
build_cmd: "pip install -U flit && flit build"
publish_on_pypi: true

# Documentation
update_docs: true
python_version_docs: "3.9"
doc_extras: "[doc]"
changelog_exclude_labels: "skip_changelog,duplicate,question,invalid,wontfix"

secrets:
PyPI_token: ${{ secrets.PYPI_TOKEN }}
PAT: ${{ secrets.RELEASE_PAT }}
4 changes: 2 additions & 2 deletions .github/workflows/ci_automerge_dependency_prs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ on:

jobs:
update-dependencies-branch:
name: Call external workflow
uses: SINTEF/ci-cd/.github/workflows/ci_automerge_prs.yml@v1
name: External
uses: SINTEF/ci-cd/.github/workflows/ci_automerge_prs.yml@v2.2.1
if: github.repository_owner == 'SINTEF' && ( ( startsWith(github.event.pull_request.head.ref, 'dependabot/') && github.actor == 'dependabot[bot]' ) || ( github.event.pull_request.head.ref == 'ci/update-pyproject' && github.actor == 'TEAM4-0' ) )
secrets:
PAT: ${{ secrets.RELEASE_PAT }}
13 changes: 10 additions & 3 deletions .github/workflows/ci_cd_updated_main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,27 @@ on:

jobs:
update-deps-branch-and-docs:
name: Call external workflow
uses: SINTEF/ci-cd/.github/workflows/ci_cd_updated_default_branch.yml@v1
name: External
uses: SINTEF/ci-cd/.github/workflows/ci_cd_updated_default_branch.yml@v2.2.1
if: github.repository_owner == 'SINTEF'
with:
# General
git_username: "TEAM 4.0[bot]"
git_email: "Team4.0@SINTEF.no"

# Update dependency branch
permanent_dependencies_branch: "ci/dependency-updates"
default_repo_branch: main
package_dirs: oteapi_optimade

# Update documentation
update_docs: true
update_python_api_ref: true
update_docs_landing_page: true
package_dirs: oteapi_optimade
python_version: "3.9"
doc_extras: "[doc]"
full_docs_dirs: models
changelog_exclude_labels: "skip_changelog,duplicate,question,invalid,wontfix"

secrets:
PAT: ${{ secrets.RELEASE_PAT }}
4 changes: 2 additions & 2 deletions .github/workflows/ci_check_dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ on:

jobs:
check-dependencies:
name: Call external workflow
uses: SINTEF/ci-cd/.github/workflows/ci_check_pyproject_dependencies.yml@v1
name: External
uses: SINTEF/ci-cd/.github/workflows/ci_check_pyproject_dependencies.yml@v2.2.1
if: github.repository_owner == 'SINTEF'
with:
git_username: "TEAM 4.0[bot]"
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/ci_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ on:

jobs:
basic-tests:
name: Call external workflow
uses: SINTEF/ci-cd/.github/workflows/ci_tests.yml@v1
name: External
uses: SINTEF/ci-cd/.github/workflows/ci_tests.yml@v2.2.1
with:
# General setup
install_extras: "[dev]"
Expand All @@ -24,10 +24,6 @@ jobs:
pylint_runs: |
--rcfile=pyproject.toml --ignore-paths=tests/ --extension-pkg-whitelist='pydantic' oteapi_optimade
--rcfile=pyproject.toml --extension-pkg-whitelist='pydantic' --disable=import-outside-toplevel,redefined-outer-name --recursive=yes tests
# Ignore ID 44715 for now.
# See this NumPy issue for more information: https://github.com/numpy/numpy/issues/19038
# NumPy is a sub-dependency of `oteapi-core`
safety_options: "--ignore=44715"
# Build dist
python_version_package: "3.9"
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/ci_update_dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,19 @@ on:

jobs:
create-collected-pr:
name: Call external workflow
uses: SINTEF/ci-cd/.github/workflows/ci_update_dependencies.yml@v1
name: External
uses: SINTEF/ci-cd/.github/workflows/ci_update_dependencies.yml@v2.2.1
if: github.repository_owner == 'SINTEF'
with:
# General
git_username: "TEAM 4.0[bot]"
git_email: "Team4.0@SINTEF.no"
permanent_dependencies_branch: "ci/dependency-updates"
default_repo_branch: main
pr_labels: "CI/CD,skip_changelog"
extra_to_dos: "- [ ] Make sure that the PR is **squash** merged, with a sensible commit message."

# Update pre-commit hooks
update_pre-commit: true
python_version: "3.9"
install_extras: "[pre-commit]"
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ repos:
- "pydantic"

- repo: https://github.com/SINTEF/ci-cd
rev: v2.1.0
rev: v2.2.1
hooks:
- id: docs-api-reference
args:
Expand Down

0 comments on commit e6d6a45

Please sign in to comment.