Skip to content

Lint views/admins, views/application, views/assessment_user_data, views/attachments #1516

Lint views/admins, views/application, views/assessment_user_data, views/attachments

Lint views/admins, views/application, views/assessment_user_data, views/attachments #1516

Workflow file for this run

# This workflow uses actions that are not certified by GitHub. They are
# provided by a third-party and are governed by separate terms of service,
# privacy policy, and support documentation.
#
# This workflow will install a prebuilt Ruby version, install dependencies, and
# run tests and linters.
name: "Ruby on Rails CI"
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
merge_group:
branches: [ master ]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install Ruby
uses: ruby/[email protected]
with:
bundler-cache: true
cache-version: 3
- name: Rubocop
run: bundle exec rubocop
test:
runs-on: ubuntu-latest
env:
RESTFUL_HOST: localhost
RESTFUL_PORT: 3000
RESTFUL_KEY: test_key
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install Ruby
uses: ruby/[email protected]
with:
bundler-cache: true
cache-version: 3
- name: Set up Autolab
run: |
cp config/database.github.yml config/database.yml
cp config/school.yml.template config/school.yml
cp config/autogradeConfig.rb.template config/autogradeConfig.rb
cp .env.template .env
mkdir attachments/ tmp/
- name: Set up database
run: |
sudo /etc/init.d/mysql start
RAILS_ENV=development bundle exec rails db:create
./bin/initialize_secrets.sh
RAILS_ENV=test bundle exec rails autolab:setup_test_env
- name: Run tests
run: bundle exec rails spec