Skip to content

Commit

Permalink
Delete database setup
Browse files Browse the repository at this point in the history
  • Loading branch information
knu committed Oct 28, 2024
1 parent dd50cc1 commit 90cf990
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 71 deletions.
41 changes: 4 additions & 37 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,45 +10,15 @@ concurrency:

jobs:
run-tests:
name: ${{ matrix.os }} ruby-${{ matrix.ruby }} ${{ matrix.database_adapter }}
runs-on: ubuntu-20.04
name: ${{ matrix.os }} ruby-${{ matrix.ruby }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
database_adapter:
- mysql2
- postgresql
os:
- ubuntu-20.04
ruby:
- "3.2"
env:
DATABASE_ADAPTER: ${{ matrix.database_adapter }}
DATABASE_HOST: "127.0.0.1"
DATABASE_USERNAME: root
DATABASE_PASSWORD: password
services:
mysql:
image: mysql:latest
env:
MYSQL_ROOT_PASSWORD: password
ports:
- 3306:3306
options: >-
--health-cmd "mysqladmin ping"
--health-interval 10s
--health-timeout 5s
--health-retries 3
postgres:
image: postgres:latest
env:
POSTGRES_USER: root
POSTGRES_PASSWORD: password
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 3
steps:
- uses: actions/checkout@v4

Expand All @@ -60,8 +30,5 @@ jobs:
bundler: latest
bundler-cache: true

- name: Set up database
run: bundle exec rake db:create db:migrate

- name: Run tests
run: bundle exec rake
38 changes: 4 additions & 34 deletions lib/huginn_agent/templates/newagent/.github/workflows/ci.yml.tt
Original file line number Diff line number Diff line change
Expand Up @@ -10,45 +10,18 @@ concurrency:

jobs:
run-tests:
name: ${{ matrix.os }} ruby-${{ matrix.ruby }} ${{ matrix.database_adapter }}
runs-on: ubuntu-20.04
name: ${{ matrix.os }} ruby-${{ matrix.ruby }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-20.04
database_adapter:
- mysql2
- postgresql
ruby:
- "3.2"
env:
DATABASE_ADAPTER: ${{ matrix.database_adapter }}
DATABASE_HOST: "127.0.0.1"
DATABASE_USERNAME: root
DATABASE_PASSWORD: password
services:
mysql:
image: mysql:latest
env:
MYSQL_ROOT_PASSWORD: password
ports:
- 3306:3306
options: >-
--health-cmd "mysqladmin ping"
--health-interval 10s
--health-timeout 5s
--health-retries 3
postgres:
image: postgres:latest
env:
POSTGRES_USER: root
POSTGRES_PASSWORD: password
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 3
steps:
- uses: actions/checkout@v4

Expand All @@ -60,8 +33,5 @@ jobs:
bundler: latest
bundler-cache: true

- name: Set up database
run: bundle exec rake db:create db:migrate

- name: Run tests
run: bundle exec rake

0 comments on commit 90cf990

Please sign in to comment.