Update to node 20 #31
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
name: Slack Test | |
on: | |
push: | |
branches: | |
- "dev" | |
- "main" | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: npm install and build | |
run: | | |
npm ci | |
npm run build | |
- name: No Job Status | |
id: job_eval_no_job_status | |
if: ${{ always() }} | |
uses: ./ | |
with: | |
ignore_test_report: true | |
- name: Notify No Job Status | |
if: ${{ always() }} | |
env: | |
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} | |
uses: kaisalmen/github-action-slack-notify-build@v3 | |
with: | |
channel_id: '#gha-testing' | |
status: ${{ steps.job_eval_no_job_status.outputs.overall_status }} | |
color: ${{ steps.job_eval_no_job_status.outputs.overall_status_color }} | |
- name: Wrong Job Status | |
id: job_eval_wrong_job_status | |
if: ${{ always() }} | |
uses: ./ | |
with: | |
job_status: "cheese" | |
ignore_test_report: true | |
- name: Notify Wrong Job Status | |
if: ${{ always() }} | |
env: | |
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} | |
uses: kaisalmen/github-action-slack-notify-build@v3 | |
with: | |
channel_id: '#gha-testing' | |
status: ${{ steps.job_eval_wrong_job_status.outputs.overall_status }} | |
color: ${{ steps.job_eval_wrong_job_status.outputs.overall_status_color }} | |
- name: Test Report Error | |
id: job_eval_test_error | |
if: ${{ always() }} | |
uses: ./ | |
with: | |
job_status: "success" | |
test_report_conclusion: "" | |
- name: Notify Test Report Error | |
if: ${{ always() }} | |
env: | |
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} | |
uses: kaisalmen/github-action-slack-notify-build@v3 | |
with: | |
channel_id: '#gha-testing' | |
status: ${{ steps.job_eval_test_error.outputs.overall_status }} | |
color: ${{ steps.job_eval_test_error.outputs.overall_status_color }} | |
- name: Report Wrong | |
id: job_eval_test_report_wrong | |
if: ${{ always() }} | |
uses: ./ | |
with: | |
job_status: "success" | |
test_report_conclusion: "sausage" | |
- name: Notify Report Wrong | |
if: ${{ always() }} | |
env: | |
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} | |
uses: kaisalmen/github-action-slack-notify-build@v3 | |
with: | |
channel_id: '#gha-testing' | |
status: ${{ steps.job_eval_test_report_wrong.outputs.overall_status }} | |
color: ${{ steps.job_eval_test_report_wrong.outputs.overall_status_color }} | |
- name: Job Success | |
id: job_eval_job_success | |
if: ${{ always() }} | |
uses: ./ | |
with: | |
job_status: "success" | |
test_report_conclusion: "success" | |
- name: Notify Job Success | |
if: ${{ always() }} | |
env: | |
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} | |
uses: kaisalmen/github-action-slack-notify-build@v3 | |
with: | |
channel_id: '#gha-testing' | |
status: ${{ steps.job_eval_job_success.outputs.overall_status }} | |
color: ${{ steps.job_eval_job_success.outputs.overall_status_color }} | |
- name: Job Failure | |
id: job_eval_job_failure | |
if: ${{ always() }} | |
uses: ./ | |
with: | |
job_status: "failure" | |
test_report_conclusion: "success" | |
- name: Notify Job Failure | |
if: ${{ always() }} | |
env: | |
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} | |
uses: kaisalmen/github-action-slack-notify-build@v3 | |
with: | |
channel_id: '#gha-testing' | |
status: ${{ steps.job_eval_job_failure.outputs.overall_status }} | |
color: ${{ steps.job_eval_job_failure.outputs.overall_status_color }} | |
- name: Test Failure Unstable Status | |
id: job_eval_test_failure_unstable_status | |
if: ${{ always() }} | |
uses: ./ | |
with: | |
job_status: "success" | |
test_report_conclusion: "failure" | |
- name: Notify Test Failure Unstable Status | |
if: ${{ always() }} | |
env: | |
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} | |
uses: kaisalmen/github-action-slack-notify-build@v3 | |
with: | |
channel_id: '#gha-testing' | |
status: ${{ steps.job_eval_test_failure_unstable_status.outputs.overall_status }} | |
color: ${{ steps.job_eval_test_failure_unstable_status.outputs.overall_status_color }} | |
- name: Test Failure Failed Status | |
id: job_eval_job_failure_failed_status | |
if: ${{ always() }} | |
uses: ./ | |
with: | |
job_status: "success" | |
test_report_conclusion: "failure" | |
fail_on_failed_tests: true | |
- name: Notify Test Failure Failed Status | |
if: ${{ always() }} | |
env: | |
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} | |
uses: kaisalmen/github-action-slack-notify-build@v3 | |
with: | |
channel_id: '#gha-testing' | |
status: ${{ steps.job_eval_job_failure_failed_status.outputs.overall_status }} | |
color: ${{ steps.job_eval_job_failure_failed_status.outputs.overall_status_color }} | |
- name: Job Cancelled | |
id: job_eval_job_cancelled | |
if: ${{ always() }} | |
uses: ./ | |
with: | |
job_status: "cancelled" | |
- name: Notify Job Cancelled | |
if: ${{ always() }} | |
env: | |
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} | |
uses: kaisalmen/github-action-slack-notify-build@v3 | |
with: | |
channel_id: '#gha-testing' | |
status: ${{ steps.job_eval_job_cancelled.outputs.overall_status }} | |
color: ${{ steps.job_eval_job_cancelled.outputs.overall_status_color }} |