-
Notifications
You must be signed in to change notification settings - Fork 0
ci: switch to GitHub Actions #228
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 9 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
586c774
ci: switch to GitHub Actions
mschoettle 9045816
test
mschoettle 39f8957
add token secret
mschoettle 192639c
add permissions to github token instead
mschoettle fe47e89
test
mschoettle 28a435f
test
mschoettle e9b7e79
use pre-installed Python version
mschoettle ffcba15
disable uploading of SARIF file
mschoettle 0a7f369
remove GitLab specific stuff
mschoettle c5cd5f6
add deploy workflow
mschoettle fc8511c
temporarily enable PR deploy
mschoettle d14f937
fix deploy job
mschoettle 9476646
add write permission
mschoettle bb49a15
revert
mschoettle File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
name: ci | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
workflow_dispatch: | ||
merge_group: | ||
|
||
concurrency: | ||
group: "${{ github.ref }}" | ||
cancel-in-progress: true | ||
|
||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
# required for upload-sarif action | ||
# https://docs.github.com/en/code-security/code-scanning/integrating-with-code-scanning/uploading-a-sarif-file-to-github#example-workflow-for-sarif-files-generated-outside-of-a-repository | ||
security-events: write | ||
contents: read | ||
steps: | ||
- name: Checkout ${{ github.repository }} | ||
uses: actions/[email protected] | ||
- name: Install uv | ||
uses: astral-sh/[email protected] | ||
id: setup-uv | ||
with: | ||
# renovate: datasource=pypi dependency=uv | ||
version: "0.5.25" | ||
# ubuntu-latest already has Python 3.x installed (pip is needed by the pre-commit action) | ||
- name: Print the installed versions | ||
run: | | ||
echo "Installed uv version is ${{ steps.setup-uv.outputs.uv-version }}" | ||
echo "Installed Python version is $(python --version)" | ||
uv python list | ||
- name: Run pre-commit | ||
uses: pre-commit/[email protected] | ||
- name: Run markdownlint | ||
uses: YannickTeKulve/[email protected] | ||
with: | ||
image: davidanson/markdownlint-cli2-rules:v0.17.2 | ||
# node user does not have permissions to workspace due to user id mismatch | ||
options: -v ${{ github.workspace }}:/workdir --user root | ||
# use the config file that is stored outside the root for CI specific configuration | ||
# don't fail step if there are violations | ||
run: markdownlint-cli2 --config .github/markdownlint/.markdownlint-cli2.yaml "**/*.md" || true | ||
# Needs to be a public repo in order for uploading SARIF files to work | ||
# https://docs.github.com/en/code-security/code-scanning/integrating-with-code-scanning/uploading-a-sarif-file-to-github | ||
# - name: Upload SARIF file | ||
# uses: github/codeql-action/upload-sarif@v3 | ||
# with: | ||
# # Path to SARIF file relative to the root of the repository | ||
# sarif_file: markdownlint-cli2-sarif.sarif | ||
# # Optional category for the results | ||
# # Used to differentiate multiple results for one commit | ||
# category: markdownlint | ||
# fail if there are markdownlint violations | ||
- name: Check markdownlint results | ||
run: | | ||
cat markdownlint-cli2-sarif.sarif | grep -q '"results": \[\]' | ||
|
||
|
||
build: | ||
runs-on: ubuntu-latest | ||
needs: | ||
- lint | ||
steps: | ||
- uses: actions/[email protected] | ||
with: | ||
# fetch the full git history to be able to determine creation dates for pages | ||
# see: https://github.com/timvink/mkdocs-git-revision-date-localized-plugin?tab=readme-ov-file#note-when-using-build-environments | ||
fetch-depth: 0 | ||
- name: Install uv | ||
uses: astral-sh/[email protected] | ||
id: setup-uv | ||
with: | ||
# renovate: datasource=pypi dependency=uv | ||
version: "0.5.25" | ||
python-version: 3.13 | ||
- name: Print the installed versions | ||
run: | | ||
echo "Installed uv version is ${{ steps.setup-uv.outputs.uv-version }}" | ||
echo "Installed Python version is ${{ steps.setup-uv.outputs.python-version }}" | ||
uv python list | ||
- name: Install dependencies | ||
run: uv pip install -r requirements.txt | ||
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV | ||
- uses: actions/[email protected] | ||
with: | ||
key: mkdocs-material-${{ env.cache_id }} | ||
path: .cache | ||
restore-keys: | | ||
mkdocs-material- | ||
- name: Build site | ||
run: mkdocs build --strict | ||
mschoettle marked this conversation as resolved.
Show resolved
Hide resolved
|
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -175,6 +175,8 @@ validation: | |
unrecognized_links: warn | ||
anchors: warn | ||
|
||
strict: true | ||
|
||
|
||
watch: | ||
- CHANGELOG.md |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this step have a name, like the checkout step above?
Same question for one of the other steps below that doesn't have a name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not required, it will then say "Run actions/[email protected]".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I leave it up to you then.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed names where it is obvious (when reusing an action).