From 58f29c66d17997d28144f58b5fa5ab4f46c48e3e Mon Sep 17 00:00:00 2001 From: Michael Mior Date: Fri, 8 Mar 2024 14:48:18 -0500 Subject: [PATCH] Switch to GitHub Actions --- .github/workflows/ci.yml | 62 ++++++++++++++++++++++++++++++++++++++++ .gitignore | 2 +- .travis.yml | 37 ------------------------ README.md | 1 - 4 files changed, 63 insertions(+), 39 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..e2d82cdd --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,62 @@ + +name: CI +on: + push: + branches: + - '*' + tags: + - 'v*' + pull_request: + branches: + - main +jobs: + test: + runs-on: ubuntu-latest + strategy: + matrix: + ruby-version: ['2.5.3', '2.6.1'] + services: + mysql: + image: mysql:5.6 + env: + MYSQL_ALLOW_EMPTY_PASSWORD: 1 + MYSQL_DATABASE: nose + ports: + - 3306:3306 + options: >- + --health-cmd="mysqladmin ping" + --health-interval=10s + --health-timeout=5s + --health-retries=5 + mongo: + image: mongo:5 + ports: + - 27017:27017 + options: >- + --health-cmd=mongo + --health-interval=10s + --health-timeout=5s + --health-retries=5 + # cassandra: + # image: cassandra:5 + # ports: + # - 9042:9042 + # options: >- + # --health-cmd=cqlsh + # --health-interval=10s + # --health-timeout=5s + # --health-retries=5 + steps: + - name: Install required packages + run: sudo apt update && sudo apt-get install coinor-cbc coinor-libcbc-dev + - uses: actions/checkout@v4 + - uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby-version }} + bundler-cache: true + - name: Populate MySQL + run: mysql -uroot -Dnose < spec/support/data/mysql.sql + - name: Test + run: | + sed -i '/^--tag/d' .rspec + bundle exec rspec diff --git a/.gitignore b/.gitignore index 86894d64..2bfe8e45 100644 --- a/.gitignore +++ b/.gitignore @@ -32,8 +32,8 @@ Gemfile.lock ## Configuration files *.yml !.scrutinizer.yml -!.travis.yml !.rubocop.yml +!.github/** ## Log files gurobi.log diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 64c4cfed..00000000 --- a/.travis.yml +++ /dev/null @@ -1,37 +0,0 @@ -language: ruby -cache: bundler -sudo: required -dist: trusty -before_install: - - sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y - - curl -L https://packagecloud.io/michaelmior/coinor/gpgkey | sudo apt-key add - - - echo "deb https://packagecloud.io/michaelmior/coinor/ubuntu/ precise main" | sudo tee -a /etc/apt/sources.list - - sudo apt-get update -qq - - sudo apt-get install -qq graphviz - - sudo apt-get install -qq coinor-libcbc-dev coinor-libcbc3 coinor-libcoinutils-dev coinor-libcoinutils3v5 coinor-libosi-dev coinor-libosi1 coinor-libclp-dev coinor-libclp1 coinor-libcgl-dev coinor-libcgl1 libstdc++6 - - gem install bundler - - mysql -uroot -e 'create database nose;' - - mysql -uroot -Dnose < spec/support/data/mysql.sql - - sudo rm -rf /var/lib/cassandra/* - - wget https://archive.apache.org/dist/cassandra/3.7/apache-cassandra-3.7-bin.tar.gz && tar -xvzf apache-cassandra-3.7-bin.tar.gz && sudo sh apache-cassandra-3.7/bin/cassandra -R && sleep 15 -rvm: - - 2.6.1 - - 2.5.3 - # Temoprarily disabled until we get this working since it slows down tests - # - jruby-9.0.5.0 -matrix: - allow_failures: - - rvm: jruby-9.0.5.0 -script: - - sed -i '/^--tag/d' .rspec - - bundle exec rspec -addons: - apt: - packages: - - mysql-server-5.6 - - mysql-client-core-5.6 - - mysql-client-5.6 - code_climate: - repo_token: 6bb85eb10136dfdb11e56bf53a9679510ca99c3c0f2495c06d6a3cb9670b9954 -services: - - mongodb diff --git a/README.md b/README.md index 104b2b1f..20cc7326 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,5 @@ # NoSQL Schema Evaluator (NoSE) -[![Build Status](https://travis-ci.org/michaelmior/NoSE.svg?branch=master)](https://travis-ci.org/michaelmior/NoSE) [![Depfu](https://badges.depfu.com/badges/69de42ee3415b077a040beadc8941f1e/overview.svg)](https://depfu.com/github/michaelmior/NoSE?project_id=6964) [![codecov](https://codecov.io/gh/michaelmior/NoSE/branch/main/graph/badge.svg?token=knALGf3kHn)](https://codecov.io/gh/michaelmior/NoSE) [![Docker Build Status](https://img.shields.io/docker/build/michaelmior/nose.svg)]()