chore(ci): upgrade to v5 #935
Workflow file for this run
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
name: Github Actions Ruby Standard | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
test-and-upstream: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.STANDARDS_TOKEN }} | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 3.2.2 | |
- name: Install dependencies | |
run: | | |
gem update --system | |
gem install bundler | |
gem install rails | |
- name: Run RSpec | |
run: | | |
bundle update --bundler | |
bundle install | |
bundle exec rspec | |
- name: Upload to Codecov | |
uses: codecov/codecov-action@v5 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN }} | |
with: | |
file: coverage/coverage.xml | |
- name: Confirm upload | |
env: | |
API_KEY: ${{ secrets.API_KEY }} | |
CORRECT_COVERAGE: ${{ vars.CORRECT_COVERAGE }} | |
run: | | |
ruby request.rb | |
- name: Upstream to Standards | |
env: | |
GH_TOKEN: ${{ secrets.STANDARDS_TOKEN }} | |
COVERAGE_SOURCE_FILE: ${{ secrets.COVERAGE_SOURCE_FILE }} | |
if: ${{ github.event_name == 'push'}} | |
run: | | |
wget --header "Authorization: token ${GH_TOKEN}" \ | |
--header "Accept: application/vnd.github.v3.raw" \ | |
https://api.github.com/repos/codecov/standards/contents/upstream.sh | |
bash upstream.sh |