Skip to content

test-urls

test-urls #130

Workflow file for this run

name: test-urls
on:
schedule:
# * is a special character in YAML so you have to quote this string
# Run the test at midnight every Saturday
- cron: '0 0 * * 6'
push:
branches:
- master
paths:
- '.github/workflows/test-urls.yml'
pull_request:
branches:
- master
paths:
- '.github/workflows/test-urls.yml'
workflow_dispatch:
inputs: {}
jobs:
test-urls:
runs-on: ubuntu-latest
steps:
- name: Checkout the code
uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: '^1.17'
- name: Test the supported URLs
# Retry up to 3 times with a 30 seconds delay
run: |
chmod +x ./test-urls.sh
tries=0
until [ "${tries}" -ge "${MAX_TRIES}" ]; do
./test-urls.sh --github-action && break
tries=$((tries+1))
sleep "${DELAY}"
done
if [ "${tries}" -ge "${MAX_TRIES}" ]; then
exit 1
fi
env:
MAX_TRIES: 3
DELAY: 30