Skip to content

CI

CI #16

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
schedule:
- cron: '0 12 * * *'
jobs:
ruby-versions:
uses: ruby/actions/.github/workflows/ruby_versions.yml@master
with:
engine: cruby-truffleruby # TODO: change to all when jruby is supported
min_version: 3.0
test:
needs: ruby-versions
runs-on: ${{ matrix.os }}
name: Ruby ${{ matrix.ruby }} / ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
ruby: ${{ fromJson(needs.ruby-versions.outputs.versions) }}
os: [ ubuntu-latest ]
# os: [ ubuntu-latest, macos-latest, windows-latest ]
# include:
# - { os: windows-latest, ruby: ucrt }
# - { os: windows-latest, ruby: mingw }
# - { os: windows-latest, ruby: mswin }
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Run the tests
run: bin/rake test
- name: Run the conformance tests
uses: sigstore/[email protected]
with:
entrypoint: ${{ github.workspace }}/bin/conformance-entrypoint
xfail: test_verify_dsse_bundle_with_trust_root
skip-signing: true
if: ${{ matrix.os }} == "ubuntu-latest"
- name: Run the conformance tests against staging
uses: sigstore/[email protected]
with:
entrypoint: ${{ github.workspace }}/bin/conformance-entrypoint
xfail: test_verify_dsse_bundle_with_trust_root
environment: staging
skip-signing: true
if: ${{ matrix.os }} == "ubuntu-latest"
- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
if: ${{ matrix.ruby }} == ${{ fromJson(needs.ruby-versions.outputs.latest) }} && ${{ matrix.os }} == "ubuntu-latest" && always()
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: sigstore/sigstore-ruby
all-tests-pass:
if: always()
needs:
- test
runs-on: ubuntu-latest
steps:
- name: check test jobs
uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe # v1.2.2
with:
jobs: ${{ toJSON(needs) }}
lint:
runs-on: ubuntu-latest
name: Lint
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.3.1"
bundler-cache: true
- name: Run the linter
run: bin/rubocop