Skip to content

Commit

Permalink
ci: update the commit status with result of tests
Browse files Browse the repository at this point in the history
  • Loading branch information
chrispymm committed Jan 9, 2025
1 parent 848b985 commit ac7f295
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/deploy-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ jobs:
node-version: [14.x, 16.x, 18.x, 20.x, 21.x, 22.x]

steps:
- name: Set commit status as pending
uses: myrotvorets/set-commit-status-action@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
status: pending
context: deploy tests
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
Expand All @@ -59,6 +65,13 @@ jobs:
path: package
- name: Test that sass can be compiled
run: npm run test:sass
- name: Set final commit status
uses: myrotvorets/set-commit-status-action@master
if: always()
with:
token: ${{ secrets.GITHUB_TOKEN }}
status: ${{ job.status }}
context: deploy tests

deploy:
runs-on: ubuntu-latest
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/publish-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ jobs:
node-version: [14.x, 16.x, 18.x, 20.x, 21.x, 22.x]

steps:
- name: Set commit status as pending
uses: myrotvorets/set-commit-status-action@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
status: pending
context: publish tests
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
Expand All @@ -54,6 +60,13 @@ jobs:
path: package
- name: Test that sass can be compiled
run: npm run test:sass
- name: Set final commit status
uses: myrotvorets/set-commit-status-action@master
if: always()
with:
token: ${{ secrets.GITHUB_TOKEN }}
status: ${{ job.status }}
context: publish tests

publish:
runs-on: ubuntu-latest
Expand Down

0 comments on commit ac7f295

Please sign in to comment.