Skip to content
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

Fix/GitHub actions #181

Merged
merged 2 commits into from
Aug 22, 2024
Merged
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
4 changes: 4 additions & 0 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ on:
release:
types: [created]

permissions:
contents: read
actions: read

jobs:
build:
runs-on: ubuntu-latest
Expand Down
15 changes: 10 additions & 5 deletions .github/workflows/publish-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,27 @@ on:
workflows: ['Run Tests']
types:
- completed
permissions:
contents: read
actions: read
checks: write
pull-requests: write
jobs:
report:
runs-on: ubuntu-latest
steps:
- name: Download workflow artifact
uses: dawidd6/action-download-artifact@v2.27.0
uses: actions/download-artifact@v4
with:
workflow: run-tests.yml
name: test-results
run_id: ${{ github.event.workflow_run.id }}
run-id: ${{ github.event.workflow_run.id }}
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Set pr number env
run: |
PR_NUMBER=$(cat pr_number)
echo "PR_NUMBER=$PR_NUMBER" >> $GITHUB_ENV
- name: Test Report
uses: phoenix-actions/test-reporting@v12
uses: phoenix-actions/test-reporting@v15
id: test-report
with:
artifact: test-results
Expand All @@ -30,4 +35,4 @@ jobs:
uses: Nef10/[email protected]
with:
pr-number: ${{ env.PR_NUMBER }}
github-token: ${{ secrets.GITHUB_TOKEN }}
github-token: ${{ secrets.GITHUB_TOKEN }}
9 changes: 6 additions & 3 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,18 @@ on:
pull_request:
branches:
- main
permissions:
contents: read
actions: read
jobs:
test:
runs-on: ubuntu-latest
steps:
- run: sudo apt-get install hunspell
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm ci
Expand All @@ -22,7 +25,7 @@ jobs:
PR_NUMBER: ${{ github.event.number }}
run: |
echo $PR_NUMBER > ./pr_number
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: success() || failure()
with:
name: test-results
Expand Down