Improve link checker on CI (#171)

This commit is contained in:
Ashish Bhatia 2023-03-26 20:43:47 -07:00 committed by GitHub
parent b2914e3425
commit 6c50a49d0a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,31 +5,38 @@
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake # This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby # For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
name: Test name: Link Test
on: on:
push: push:
branches: [ master ] branches: [master, main]
pull_request: pull_request:
branches: [ master ] branches: [master, main]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs: jobs:
test: validateLinks:
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 60
steps: steps:
- uses: actions/checkout@v2
- name: Set up Ruby - name: Checkout code
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby, uses: actions/checkout@v3
# change this to (see https://github.com/ruby/setup-ruby#versioning):
# uses: ruby/setup-ruby@v1 - name: Set up Ruby
uses: ruby/setup-ruby@v1 # See https://github.com/ruby/setup-ruby#versioning
with: uses: ruby/setup-ruby@v1
ruby-version: 2.6 with:
- name: Install dependencies ruby-version: 3.0
run: gem install awesome_bot
- name: Run tests - name: Install dependencies
run: | run: gem install awesome_bot
# Some URLs could be flaky, try twice in case the first execution fails. - name: Run tests
bash run_awesome_bot.sh || bash run_awesome_bot.sh run: |
# Some URLs could be flaky, try twice in case the first execution fails.
bash run_awesome_bot.sh || bash run_awesome_bot.sh