-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch CI from TravisCI to Github Actions
- Loading branch information
1 parent
3a7be17
commit c952f31
Showing
4 changed files
with
79 additions
and
37 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,64 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: ['**'] | ||
|
||
jobs: | ||
tests: | ||
services: | ||
postgres: | ||
image: postgres:13 | ||
env: | ||
POSTGRES_USER: postgres | ||
POSTGRES_PASSWORD: postgres | ||
ports: | ||
- 5432 | ||
options: >- | ||
--health-cmd pg_isready | ||
--health-interval 10s | ||
--health-timeout 5s | ||
--health-retries 5 | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
ruby: | ||
- "2.7" | ||
- "3.0" | ||
- "3.1" | ||
- "3.2" | ||
- "3.3" | ||
name: Ruby ${{ matrix.ruby }} | ||
|
||
env: | ||
SEQUEL: "~> 5.0" | ||
BUNDLE_GEMFILE: "ci/sequel.gemfile" | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install db dependencies and check connections | ||
run: | | ||
env PGPASSWORD=postgres psql -h localhost -p ${{ job.services.postgres.ports[5432] }} -U postgres -l | ||
- uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: ${{ matrix.ruby }} | ||
bundler-cache: true | ||
- name: Create databases | ||
run: | | ||
env PGPASSWORD=postgres psql -c 'create database sequel_bitemporal_test;' -U postgres -h localhost -p ${{ job.services.postgres.ports[5432] }} | ||
- name: Run PostgreSQL tests | ||
run: bundle exec rake spec | ||
env: | ||
TEST_ADAPTER: postgresql | ||
TEST_DATABASE: sequel_bitemporal_test | ||
TEST_DATABASE_HOST: localhost | ||
TEST_DATABASE_PORT: ${{ job.services.postgres.ports[5432] }} | ||
TEST_USERNAME: postgres | ||
TEST_PASSWORD: postgres | ||
- name: Run SQLite tests | ||
run: bundle exec rake spec | ||
env: | ||
TEST_ADAPTER: sqlite |
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