Skip to content

Bump get-func-name from 2.0.0 to 2.0.2 (#17) #35

Bump get-func-name from 2.0.0 to 2.0.2 (#17)

Bump get-func-name from 2.0.0 to 2.0.2 (#17) #35

Workflow file for this run

name: Tests
on:
pull_request:
branches: [main]
push:
branches: [main]
jobs:
unit-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16'
- run: yarn
- run: yarn test
integration-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '16'
- run: yarn
- run: yarn compile
- name: Set alert values
run: |
export ALIAS=create-alert-int-test-$(date +%s)
export MESSAGE="Create alert integration test"
export SOURCE="create alert integration test"
echo "ALERT_ALIAS=$(echo -n $ALIAS)" >> $GITHUB_ENV
echo "MESSAGE=$(echo -n $MESSAGE)" >> $GITHUB_ENV
echo "SOURCE=$(echo -n $SOURCE)" >> $GITHUB_ENV
- name: Create OpsGenie Alert
uses: ./
with:
api_key: ${{ secrets.OPSGENIE_API_KEY }}
alias: ${{ env.ALERT_ALIAS }}
message: ${{ env.MESSAGE }}
source: ${{ env.SOURCE }}
priority: P5
tags: kuku
using_eu_url: false
- name: Assert alert created
env:
OPSGENIE_API_KEY: ${{ secrets.OPSGENIE_API_KEY }}
run: |
./.github/workflows/assert_alert_created_with.js \
${{ env.ALERT_ALIAS }} \
"${{ env.MESSAGE }}" \
P5 \
kuku \
"${{ env.SOURCE }}"