CI Test #217
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 | |
name: CI Test | |
on: | |
schedule: | |
- cron: '0 0 * * 5' | |
push: | |
branches: [main] | |
pull_request: | |
types: [opened, synchronize] | |
branches: ['*'] | |
workflow_dispatch: | |
permissions: | |
contents: read | |
jobs: | |
test: | |
permissions: | |
checks: write # for coverallsapp/github-action to create new checks | |
contents: read # for actions/checkout to fetch code | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu, macos, windows] | |
ruby: [3.1, 3.2, 3.3] | |
runs-on: ${{ matrix.os }}-latest | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1 | |
with: | |
egress-policy: audit | |
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@f26937343756480a8cb3ae1f623b9c8d89ed6984 # v1.196.0 | |
with: | |
ruby-version: ${{ matrix.ruby }} | |
bundler-cache: true | |
- name: Run tests | |
run: bundle exec rake | |
- name: Build Yard documentation | |
run: bundle exec rake yard | |
- name: Report to Coveralls | |
uses: coverallsapp/github-action@643bc377ffa44ace6394b2b5d0d3950076de9f63 # v2.3.0 | |
with: | |
github-token: ${{ secrets.github_token }} | |
flag-name: test-${{ matrix.os }}-${{ matrix.ruby }} | |
parallel: true | |
finish: | |
permissions: | |
checks: write # for coverallsapp/github-action to create new checks | |
needs: test | |
if: ${{ always() }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1 | |
with: | |
egress-policy: audit | |
- name: Report completion to Coveralls | |
uses: coverallsapp/github-action@643bc377ffa44ace6394b2b5d0d3950076de9f63 # v2.3.0 | |
with: | |
github-token: ${{ secrets.github_token }} | |
parallel-finished: true |