From d3c8a333ec6b9ad2df4c95a0a373beb76ddaf219 Mon Sep 17 00:00:00 2001 From: Anton Yudin Date: Sun, 14 Jul 2024 16:47:14 +0300 Subject: [PATCH] add test and rubocop reports --- .github/workflows/{ruby.yml => rubocop.yml} | 10 +------- .github/workflows/test.yml | 28 +++++++++++++++++++++ README.md | 4 +-- 3 files changed, 31 insertions(+), 11 deletions(-) rename .github/workflows/{ruby.yml => rubocop.yml} (72%) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/ruby.yml b/.github/workflows/rubocop.yml similarity index 72% rename from .github/workflows/ruby.yml rename to .github/workflows/rubocop.yml index 8f40692..ec81bfe 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/rubocop.yml @@ -1,4 +1,4 @@ -name: Ruby +name: Rubocop on: push: @@ -26,11 +26,3 @@ jobs: bundler-cache: true - name: Rubocop run: bundle exec rubocop - - - name: Run tests - run: bundle exec rake test - - - name: Codecov coverage - uses: codecov/codecov-action@v4.0.1 - with: - token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..80c941d --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,28 @@ +name: Test + +on: + push: + branches: [ 'main' ] + pull_request: + branches: [ 'main' ] + +permissions: + contents: read + +jobs: + ruby_workflow_checkout: + runs-on: ubuntu-latest + strategy: + matrix: + ruby-version: ['3.0'] + + steps: + - uses: actions/checkout@v4 + + - name: Run tests + run: bundle exec rake test + + - name: Codecov coverage + uses: codecov/codecov-action@v4.0.1 + with: + token: ${{ secrets.CODECOV_TOKEN }} diff --git a/README.md b/README.md index 452054f..76b5642 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ # School21 API SDK +![](https://github.com/ikael21/school21_api_sdk/actions/workflows/tests.yml/badge.svg) [![codecov](https://codecov.io/github/ikael21/school21_api_sdk/branch/main/graph/badge.svg?token=O7I31Q7N96)](https://codecov.io/github/ikael21/school21_api_sdk) - -TODO: ... +![](https://github.com/ikael21/school21_api_sdk/actions/workflows/rubocop.yml/badge.svg) ## Installation