Skip to content

Commit

Permalink
👷 run Codecov as a separate workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
alaz committed May 19, 2024
1 parent 06700e7 commit 6250f5c
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 4 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: autocorrect

on:
pull_request:

push:
branches:
- "master"

jobs:
codecov:
runs-on: ubuntu-latest

strategy:
matrix:
ruby: [3.0]

steps:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- name: Cache dependencies
uses: actions/cache@v3
with:
path: vendor/bundle
key: ${{ runner.os }}-${{ matrix.ruby }}-gems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-${{ matrix.ruby }}-gems-
- name: Install dependencies
run: |
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
- name: Run tests
run: bundle exec rake test
- name: Upload coverage
uses: codecov/codecov-action@v4
with:
files: coverage/coverage.xml
token: ${{ secrets.CODECOV_TOKEN }}
4 changes: 0 additions & 4 deletions .github/workflows/build.yml → .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@ jobs:
bundle install --jobs 4 --retry 3
- name: Run tests
run: bundle exec rake test
- name: Upload coverage
uses: codecov/codecov-action@v3
with:
files: coverage/coverage.xml

lint:
needs: test
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ Gemfile.lock
.bundle
*.gem
*.gemfile.lock
/.vscode
/coverage
/pkg
/tags
Expand Down

0 comments on commit 6250f5c

Please sign in to comment.