-
Notifications
You must be signed in to change notification settings - Fork 9
45 lines (39 loc) · 1.1 KB
/
check-api.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: Check access to API
on:
workflow_dispatch:
schedule:
- cron: "0 12 * * *"
jobs:
check-api:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
participant: [mst, sacrt, sbmtd]
env: [qa, prod]
steps:
- uses: actions/checkout@v4
with:
repository: "cal-itp/littlepay"
- name: Install the littlepay library
run: |
python3 -m pip install --upgrade pip
pip install -e .
- name: Create config file and set config
run: |
cat > config.yaml <<- EOM
${{ secrets.API_CHECK_CONFIG }}
EOM
littlepay config config.yaml
- name: Run littlepay to get access token
run: |
littlepay switch env ${{ matrix.env }}
littlepay switch participant ${{ matrix.participant }}
- name: Report failure to Slack
if: always()
uses: ravsamhq/notify-slack-action@v2
with:
status: ${{ job.status }}
notify_when: "failure"
env:
SLACK_WEBHOOK_URL: ${{ secrets.ACTION_MONITORING_SLACK }}