Skip to content

Check access to API #873

Check access to API

Check access to API #873

Workflow file for this run

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 }}