From 8324065c071f132bc68ed3f2f95c6b49e1fcbffc Mon Sep 17 00:00:00 2001 From: Michael Mior Date: Mon, 11 Mar 2024 12:09:43 -0400 Subject: [PATCH] Switch to GitHub Actions for testing --- .github/workflows/ci.yml | 36 ++++++++++++++++++++++++++++++++++++ .gitignore | 2 +- nose-cli.gemspec | 2 +- 3 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..1bc253b --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,36 @@ + +name: CI +on: + push: + branches: + - '*' + tags: + - 'v*' + pull_request: + branches: + - main +jobs: + test: + runs-on: ubuntu-latest + strategy: + matrix: + ruby-version: ['3.1.4', '3.2.3', '3.3.0'] + steps: + - name: Install required packages + run: sudo apt update && sudo apt-get install coinor-cbc coinor-libcbc-dev graphviz + - uses: actions/checkout@v4 + - uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby-version }} + bundler-cache: true + - name: Populate MySQL + run: mysql -h 127.0.0.1 -uroot -Dnose < spec/support/data/mysql.sql + - name: Test + run: | + sed -i '/^--tag/d' .rspec + bundle exec rspec + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v4 + with: + fail_ci_if_error: true + token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.gitignore b/.gitignore index 0db044c..42465e7 100644 --- a/.gitignore +++ b/.gitignore @@ -32,8 +32,8 @@ ## Configuration files *.yml !.scrutinizer.yml -!.travis.yml !.rubocop.yml +!.github/** ## Log files gurobi.log diff --git a/nose-cli.gemspec b/nose-cli.gemspec index 18f7331..f6ad51b 100644 --- a/nose-cli.gemspec +++ b/nose-cli.gemspec @@ -16,7 +16,7 @@ Gem::Specification.new do |s| s.add_dependency 'ansi-to-html', '~> 0.0.3' s.add_dependency 'descriptive_statistics', '~> 2.5.1', '>= 2.5.0' s.add_dependency 'gruff', '~> 0.7.0' - s.add_dependency 'nose', '~> 0.1.4' + s.add_dependency 'nose', '~> 0.2.0' s.add_dependency 'representable', '= 3.0.0' s.add_dependency 'table_print', '~> 1.5.6', '>= 1.5.0' s.add_dependency 'thor', '~> 0.19.4'