Skip to content

Commit

Permalink
Merge pull request #550 from umts/werebus/actions
Browse files Browse the repository at this point in the history
Switch from Travis to Actions
  • Loading branch information
werebus authored Jan 14, 2025
2 parents 0ef0d12 + 0772795 commit af6425c
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 33 deletions.
12 changes: 12 additions & 0 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: setup
description: Setup the repository
runs:
using: composite
steps:
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- uses: actions/setup-node@v4
with:
node-version: 'lts/*'
cache: yarn
34 changes: 34 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: ci
on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
rspec:
runs-on: ubuntu-latest
services:
mariadb:
image: mariadb:10.4
env:
MARIADB_ALLOW_EMPTY_ROOT_PASSWORD: true
ports:
- 3306:3306
env:
RAILS_ENV: test
DATABASE_URL: mysql2://[email protected]:3306/incidents_test
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup
- run: bin/setup
- run: bundle exec rspec
- name: Archive failed system test screenshots
if: failure()
uses: actions/upload-artifact@v4
with:
name: failed-test-screenshots
path: tmp/capybara/*.png
if-no-files-found: ignore
33 changes: 0 additions & 33 deletions .travis.yml

This file was deleted.

2 changes: 2 additions & 0 deletions db/seeds.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
require 'paper_trail'
require 'timecop'

exit if Rails.env.test?

divisions = %w[SPFLD NOHO SMECH].map do |n|
FactoryBot.create :division, name: n
end
Expand Down

0 comments on commit af6425c

Please sign in to comment.