-
Notifications
You must be signed in to change notification settings - Fork 11
Add GitHub Actions workflow for CI #223
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
13fee8f
Add GitHub Actions workflow
Holmes98 ff6ecb3
Add postgres configuration for CI
Holmes98 087ff3c
Fix debootstrap install script in CI
Holmes98 3840596
Fix coveralls integration
Holmes98 ca9d8c3
Fix isolock permissions in CI
Holmes98 cb30553
Bump bcrypt from 3.1.11 to 3.1.20
Holmes98 90541dd
Update to coverallsapp/github-action@v2, remove simplecov-lcov
tom93 b8ab4da
Set RAILS_ENV and DATABASE_URL for all of CI job
tom93 2858090
Use valid user with pg_isready to suppress error messages
tom93 afdf0ca
Don't use --skip-update with install.bash in CI
tom93 7195265
Use postgres service settings to create nztraintest db
tom93 65aef28
Add lint job to CI running "standardrb"
tom93 a25c637
Tweak CI workflow to match Ruby on Rails template
tom93 fc8ccc9
fixup! Use postgres service settings to create nztraintest db
tom93 2213c71
Comment out db:test:load
tom93 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,69 @@ | ||
| name: Continuous Integration | ||
| on: [push, pull_request] | ||
| jobs: | ||
| test: | ||
| runs-on: ubuntu-20.04 | ||
| services: | ||
| postgres: | ||
| image: postgres:11-alpine | ||
| ports: ["5432:5432"] | ||
| env: | ||
| #POSTGRES_DB: nztraintest # not required because script/install.bash creates the database | ||
| POSTGRES_USER: postgres | ||
| POSTGRES_PASSWORD: postgres | ||
| options: >- | ||
| --health-cmd "pg_isready -U postgres" | ||
| --health-interval 10s | ||
| --health-timeout 5s | ||
| --health-retries 5 | ||
| redis: | ||
| image: redis | ||
| ports: ["6379:6379"] | ||
| options: >- | ||
| --health-cmd "redis-cli ping" | ||
| --health-interval 10s | ||
| --health-timeout 5s | ||
| --health-retries 5 | ||
|
|
||
| env: | ||
| RAILS_ENV: test | ||
| DATABASE_URL: "postgresql://postgres:postgres@localhost:5432" | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| - uses: ruby/setup-ruby@v1 | ||
| with: | ||
| bundler-cache: true | ||
|
|
||
| - run: bash script/install/config.bash --defaults | ||
| env: | ||
| DATABASE_USERNAME: postgres | ||
| DATABASE: | ||
| TEST_DATABASE: nztraintest | ||
| REDIS_INSTALL: false | ||
| REDIS_PASS: | ||
| SCHEDULE_BACKUPS: 0 | ||
| ISOLATE_ROOT: / | ||
| ISOLATE_CGROUPS: false | ||
| ISOLATE_BRANCH: master | ||
|
|
||
| - run: AUTOCONFIRM=true script/install.bash | ||
| env: | ||
| PGHOST: localhost | ||
| PGUSER: postgres | ||
|
tom93 marked this conversation as resolved.
|
||
| PGPASSWORD: postgres | ||
|
|
||
| #- run: bundle exec rake db:test:load # not required because script/install.bash runs db:migrate | ||
| - run: bundle exec rspec | ||
|
|
||
| - uses: coverallsapp/github-action@v2 | ||
|
|
||
| lint: | ||
| runs-on: ubuntu-20.04 | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| - uses: ruby/setup-ruby@v1 | ||
| with: | ||
| bundler-cache: true | ||
|
|
||
| - run: bundle exec standardrb --parallel | ||
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -19,6 +19,6 @@ | |
| /db/backup/ | ||
| /db/backups/ | ||
| /.fontello | ||
| /coverage/.* | ||
| /coverage/ | ||
| /vendor/bundle | ||
|
|
||
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.