Skip to content

サイトマップ生成ほか #28

サイトマップ生成ほか

サイトマップ生成ほか #28

Workflow file for this run

# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Node.js unit test
on:
push:
branches-ignore:
- main
pull_request:
branches:
- main
jobs:
unit-test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [17.3.0]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm install
- run: npm run test:unit-cov
notice:
if: ${{ always() }}
needs: unit-test
runs-on: ubuntu-latest
steps:
- name: Extract branch name
shell: bash
run: echo "::set-output name=branch::${GITHUB_REF#refs/heads/}"
id: extract_branch
- name: Post to a Slack channel
id: slack
uses: slackapi/[email protected]
with:
# Slack channel id, channel name, or user id to post message.
# See also: https://api.slack.com/methods/chat.postMessage#channels
channel-id: 'github-notice'
# For posting a simple plain text message
slack-message: "銀河麻雀:UT [ ${{ steps.extract_branch.outputs.branch }} ] ${{ needs.unit-test.result }}\n${{ github.event.pull_request.html_url || github.event.head_commit.url }}"
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}