GitHub Actions #2336
This file contains hidden or 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 | |
| on: | |
| push: | |
| paths-ignore: | |
| - CODE_OF_CONDUCT.md | |
| - LICENSE.txt | |
| - README.md | |
| pull_request: | |
| paths-ignore: | |
| - CODE_OF_CONDUCT.md | |
| - LICENSE.txt | |
| - README.md | |
| schedule: | |
| - cron: '0 3 * * *' | |
| workflow_dispatch: | |
| jobs: | |
| rubocop: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@master | |
| - name: Setup Ruby | |
| uses: ruby/setup-ruby@master | |
| with: | |
| ruby-version: 4.0.1 | |
| - name: Run apt-get | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install libcurl4-openssl-dev | |
| - name: Fix gem directory permissions | |
| run: sudo chmod +t $(ruby -e 'puts Gem.default_dir')/gems | |
| - name: Bundle install | |
| run: | | |
| gem install bundler | |
| bundle install --jobs 4 --retry 3 | |
| - name: Run rubocop | |
| run: | | |
| rubocop | |
| rspec: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| ruby: [ 3.2, 3.3, 3.4, 4.0 ] | |
| steps: | |
| - uses: actions/checkout@master | |
| - name: Setup Ruby | |
| uses: ruby/setup-ruby@master | |
| with: | |
| ruby-version: ${{ matrix.ruby }} | |
| - name: Run apt-get | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install libcurl4-openssl-dev | |
| - name: Fix gem directory permissions | |
| run: sudo chmod +t $(ruby -e 'puts Gem.default_dir')/gems | |
| - name: Bundle install | |
| run: | | |
| gem install bundler | |
| bundle install --jobs 4 --retry 3 | |
| - name: Run rspec | |
| run: bundle exec rspec | |
| - name: Run Codacy Coverage Reporter | |
| env: | |
| CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }} | |
| run: bash <(curl -Ls https://coverage.codacy.com/get.sh) report -l ruby -r coverage/coverage.xml |