Skip to content

Commit

Permalink
Update ci
Browse files Browse the repository at this point in the history
  • Loading branch information
hakanensari committed Sep 12, 2024
1 parent dd0e09e commit e10dd01
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 34 deletions.
56 changes: 22 additions & 34 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,55 +3,43 @@ name: build
on: [push, pull_request]

jobs:
rubocop:
lint:
runs-on: ubuntu-latest
container:
image: ruby:3.1
steps:
- uses: actions/checkout@v3
- run: gem install bundler
- run: bundle install
- run: bundle exec rake rubocop
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: "3.3"
bundler-cache: true
- run: bundle exec rubocop

test:
runs-on: ubuntu-latest
needs: [lint]
strategy:
matrix:
ruby: [2.7, 3.0, 3.1]
gemfile: [libxml, nokogiri, ox, rexml]
container:
image: ruby:${{ matrix.ruby }}
steps:
- uses: actions/checkout@v3
- run: gem install bundler
- run: bundle install
- run: bundle exec appraisal ${{ matrix.gemfile }} bundle install
- run: bundle exec appraisal ${{ matrix.gemfile }} rake test
env:
LC_ALL: C.UTF-8

documentation:
ruby: ["3.2", "3.3"]
runs-on: ubuntu-latest
container:
image: ruby:3.1
steps:
- uses: actions/checkout@v3
- run: ./bin/crawl-documentation.rb
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- run: bundle exec rake test

coverage:
if: github.event_name == 'push'
needs: [rubocop, test, documentation]
needs: [test]
runs-on: ubuntu-latest
container:
image: ruby:3.0
steps:
- uses: actions/checkout@v3
- run: gem install bundler
- run: bundle install
- uses: paambaati/codeclimate-action@v3.0.0
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: "3.3"
bundler-cache: true
- uses: paambaati/codeclimate-action@v9.0.0
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
LC_ALL: C.UTF-8
COVERAGE: true
with:
coverageCommand: bundle exec rake test
File renamed without changes.

0 comments on commit e10dd01

Please sign in to comment.