-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #121 from sensebox/chore/tests-update
tests / update
- Loading branch information
Showing
19 changed files
with
1,384 additions
and
491 deletions.
There are no files selected for viewing
This file contains 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 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,49 @@ | ||
name: Update Release Body | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
update-release-body: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
# Checkout the repository | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install jq | ||
run: sudo apt-get install jq | ||
|
||
- name: Build docker container | ||
run: docker build -t sketches --no-cache . | ||
|
||
# Generate the libraries list | ||
- name: Generate libraries list | ||
id: generate_libraries_list | ||
run: docker run sketches arduino-cli lib list --all > libraries.txt | ||
|
||
# Read generated content into a variable | ||
- name: Read generated content | ||
id: read_content | ||
run: echo "content=$(cat libraries.txt)" >> $GITHUB_OUTPUT | ||
|
||
# Update the release body | ||
- name: Update Release Body | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
# Fetch the release details | ||
RELEASE_URL=$(jq -r '.release.url' "${GITHUB_EVENT_PATH}") | ||
RELEASE_BODY=$(jq -r '.release.body' "${GITHUB_EVENT_PATH}") | ||
# Append the generated text with a heading | ||
NEW_BODY="${RELEASE_BODY}\n\n## Libraries\n\n\`\`\`\n${{ steps.read_content.outputs.content }}\n\`\`\`" | ||
# Update the release body using GitHub API | ||
curl -X PATCH \ | ||
-H "Authorization: Bearer $GITHUB_TOKEN" \ | ||
-H "Accept: application/vnd.github.v3+json" \ | ||
"${RELEASE_URL}" \ | ||
-d "{\"body\":\"${NEW_BODY}\"}" |
This file contains 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 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 |
---|---|---|
|
@@ -2,3 +2,5 @@ node_modules | |
yarn-error.log | ||
*.bin | ||
*.hex | ||
|
||
ctrf |
This file contains 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 was deleted.
Oops, something went wrong.
This file contains 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,3 @@ | ||
{ | ||
"reporterEnabled": "spec, mocha-ctrf-json-reporter" | ||
} |
This file contains 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 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
Oops, something went wrong.