diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a401099..b491d27 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 @@ -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 diff --git a/lib/huginn_agent/templates/newagent/.github/workflows/ci.yml.tt b/lib/huginn_agent/templates/newagent/.github/workflows/ci.yml.tt index a401099..4e6fb50 100644 --- a/lib/huginn_agent/templates/newagent/.github/workflows/ci.yml.tt +++ b/lib/huginn_agent/templates/newagent/.github/workflows/ci.yml.tt @@ -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 @@ -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