Skip to content

Install Test

Install Test #14

Workflow file for this run

name: Install Test
on:
schedule:
- cron: '45 23 * * *'
workflow_dispatch:
jobs:
install:
name: Install and test
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v4
with:
node-version: 20
- name: install
run: |
npm install @flowfuse/flowfuse
mkdir etc var
cp node_modules/@flowfuse/flowfuse/etc/flowforge.yml etc/
ls -lh node_modules/.bin
- name: start server in background
uses: JarvusInnovations/background-action@v1
with:
run: |
node_modules/.bin/flowfuse
wait-on: |
http://localhost:3000
tail: true
wait-for: 2m
log-output: stderr,stdout
log-output-if: failure
- name: test access
run: |
curl -L -v http://localhost:3000
- name: simulate the error
run: |
echo "This is the error"
exit 1
notify-slack:
name: Notify about test failure
needs: [install]
if: failure()
runs-on: ubuntu-latest
steps:
- name: Post to a Slack channel
id: slack
uses: slackapi/[email protected]
with:
channel-id: 'C03AP45RSFP'
payload: |
{
"blocks": [
{
"type": "header",
"text": {
"type": "plain_text",
"text": ":fire: Install Test workflow failed",
"emoji": true
}
},
{
"type": "divider"
},
{
"type": "section",
"fields": [
{
"type": "mrkdwn",
"text": "*Status:*\n$':x: Failure '
},
{
"type": "mrkdwn",
"text": "`${{ github.workflow.name }}` failed to complete successfully."
},
{
"type": "mrkdwn",
"text": "*Workflow run:*\n<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View>"
}
]
}
]
}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_GHBOT_TOKEN }}