diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..fa13bee --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,41 @@ +name: CI + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + test: + runs-on: ubuntu-latest + + strategy: + matrix: + ruby-version: ['3.4.1'] + + steps: + - uses: actions/checkout@v4 + + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby-version }} + bundler-cache: true + + - name: Install dependencies + run: bundle install + + - name: Setup database + run: | + RAILS_ENV=test bundle exec rails db:create + RAILS_ENV=test bundle exec rails db:migrate + + - name: Run tests + env: + RAILSGOAT_MAINTAINER: true + run: bundle exec rspec + + - name: Run security audit + run: bundle exec bundle-audit check --update + continue-on-error: true diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 600481b..0000000 --- a/.travis.yml +++ /dev/null @@ -1,16 +0,0 @@ -language: ruby -rvm: - - "2.6.5" - -before_install: - - "phantomjs --version" - - "export PATH=${PWD}/travis_phantomjs/phantomjs-2.1.1-linux-x86_64/bin:${PATH}" - - "phantomjs --version" - - "if [ $(phantomjs --version) != '2.1.1' ]; then rm -rf ${PWD}/travis_phantomjs; mkdir -p ${PWD}/travis_phantomjs; fi" - - "if [ $(phantomjs --version) != '2.1.1' ]; then wget https://assets.membergetmember.co/software/phantomjs-2.1.1-linux-x86_64.tar.bz2 -O ${PWD}/travis_phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2; fi" - - "if [ $(phantomjs --version) != '2.1.1' ]; then tar -xvf ${PWD}/travis_phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2 -C ${PWD}/travis_phantomjs; fi" - - "phantomjs --version" - -before_script: bundle exec rails db:test:prepare -cache: bundler -env: RAILSGOAT_MAINTAINER=true