.github/workflows/ci.yaml in motoko-1.2.0 vs .github/workflows/ci.yaml in motoko-1.2.1

- old
+ new

@@ -1,41 +1,54 @@ --- -name: "CI" +name: CI on: push: branches: - - "main" + - main pull_request: branches: - - "main" + - main jobs: rubocop: - runs-on: "ubuntu-latest" + runs-on: ubuntu-latest steps: - - uses: "actions/checkout@v2" - - name: "Setup Ruby" - uses: "ruby/setup-ruby@v1" + - uses: actions/checkout@v4 + - name: Setup ruby + uses: ruby/setup-ruby@v1 with: - ruby-version: "3.0" + ruby-version: 3.0 bundler-cache: true - - name: "Run rubocop" - run: "bundle exec rubocop" - test: - runs-on: "ubuntu-latest" + - name: Run static code analysis + run: bundle exec rubocop + unit: + runs-on: ubuntu-latest + needs: rubocop strategy: matrix: - ruby-version: + ruby: - "2.5" - "2.6" - "2.7" - "3.0" + - "3.1" + - "3.2" + - "3.3" + name: Ruby ${{ matrix.ruby }} steps: - - uses: "actions/checkout@v2" - - name: "Setup Ruby" - uses: "ruby/setup-ruby@v1" + - uses: actions/checkout@v4 + - name: Setup ruby + uses: ruby/setup-ruby@v1 with: - ruby-version: ${{ matrix.ruby-version }} + ruby-version: ${{ matrix.ruby }} bundler-cache: true - - name: "Run the test suite" - run: "bundle exec rake" + - name: Run tests without uploading code coverage + if: ${{ matrix.ruby != '3.0' }} + run: bundle exec rake + - name: Run tests and upload coverage to Code Climate + if: ${{ matrix.ruby == '3.0' }} + uses: paambaati/codeclimate-action@v9.0.0 + env: + CC_TEST_REPORTER_ID: ${{ secrets.CODECLIMATE_TOKEN }} + with: + coverageCommand: bundle exec rake