Merge pull request #494 from OWASP/feature/migrate-to-github-actions

Migrate from TravisCI to GitHub Actions
This commit is contained in:
Ken Johnson
2026-01-05 12:39:13 -05:00
committed by GitHub
2 changed files with 41 additions and 16 deletions
+41
View File
@@ -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
-16
View File
@@ -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