-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #294 from jhsu802701/github-workflows
Added GitHub Workflows
- Loading branch information
Showing
9 changed files
with
62 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: CI | ||
|
||
on: [push, pull_request ] | ||
|
||
jobs: | ||
verify: | ||
runs-on: ubuntu-latest | ||
|
||
defaults: | ||
run: | ||
working-directory: ./src | ||
|
||
services: | ||
postgres: | ||
image: postgres:latest | ||
ports: ["5432:5432"] | ||
env: | ||
POSTGRES_HOST_AUTH_METHOD: trust | ||
POSTGRES_DB: sessionizer_test | ||
POSTGRES_USER: vagrant | ||
POSTGRES_PASSWORD: vagrant | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install Linux libraries | ||
run: sudo apt-get install -y libpq-dev | ||
|
||
- name: Set up Ruby and run bundle install | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: 2.7.7 | ||
bundler-cache: true | ||
working-directory: ./src | ||
|
||
- name: Show Ruby version | ||
run: ruby -v | ||
|
||
- name: Prepare database and run tests | ||
env: | ||
CI: github | ||
RAILS_ENV: test | ||
POSTGRES_DB: sessionizer_test | ||
POSTGRES_USER: vagrant | ||
POSTGRES_PASSWORD: vagrant | ||
run: | | ||
bundle exec rake db:create db:migrate db:test:prepare | ||
bundle exec rails spec |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters