Skip to content
This repository has been archived by the owner on Aug 10, 2024. It is now read-only.

Commit

Permalink
add slackbot to workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
llibarona committed Feb 18, 2022
1 parent ba827bf commit d94161a
Show file tree
Hide file tree
Showing 3 changed files with 80 additions and 2 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,17 @@ jobs:
- run: npm run build --if-present
- run: npm run test
- run: vsce publish --no-git-tag-version patch

- name: Notify slack
id: slack
uses: slackapi/[email protected]
with:
# This data can be any valid JSON from a previous step in the GitHub Action
payload: |
{
"project": "als-vscode :vscode:",
"result": "This job finished successfully: https://marketplace.visualstudio.com/items?itemName=MuleSoftInc.aml-vscode",
"version": "${{ github.event.inputs.als-version }}"
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
50 changes: 50 additions & 0 deletions .github/workflows/test-manual.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# 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: Manual Test CI

on:
workflow_dispatch:
inputs:
als-version:
description: 'ALS node client version to install (f.e.: 1.2.3-SNAPSHOT.45)'
required: true
default: 'latest'
type: string

env:
NODE_OPTIONS: --max_old_space_size=4096
jobs:
build:
runs-on: windows-latest
strategy:
matrix:
node-version: [14.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci
- name: Install ALS node client ${{ github.event.inputs.als-version }}
run: npm install @aml-org/als-node-client@${{ github.event.inputs.als-version }}
- run: npm run build --if-present
- id: test
run: npm run test
continue-on-error: true
- name: Notify slack
id: slack
uses: slackapi/[email protected]
with:
# This data can be any valid JSON from a previous step in the GitHub Action
payload: |
{
"project": "als-vscode :vscode:",
"result": "${{ steps.test.outcome }}",
"version": "${{ github.event.inputs.als-version }}"
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
18 changes: 16 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ on:
pull_request:
types: [opened, reopened, edited, synchronize]
branches: [ master ]
workflow_dispatch:
env:
NODE_OPTIONS: --max_old_space_size=4096
jobs:
Expand All @@ -26,4 +25,19 @@ jobs:
cache: 'npm'
- run: npm ci
- run: npm run build --if-present
- run: npm run test
- id: test
run: npm run test
continue-on-error: true
- name: Notify slack
id: slack
uses: slackapi/[email protected]
with:
# This data can be any valid JSON from a previous step in the GitHub Action
payload: |
{
"project": "als-vscode :vscode:",
"result": "${{ steps.test.outcome}}",
"version": "${{ npm list --depth=0 | grep als-node-client }}"
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

0 comments on commit d94161a

Please sign in to comment.