Sha256: 0a395965a6f2ed2bf5eecc7add810d0fd18b3694df1babf22cf77591f5d2902f

Contents?: true

Size: 1.84 KB

Versions: 5

Compression:

Stored size: 1.84 KB

Contents

name: CI
on:
  push:
    branches: [ main ]
  pull_request:
    branches: [ main ]
jobs:
  test:
    name: Tests
    runs-on: ubuntu-latest
    services:
      postgres:
        image: postgres:11
        env:
          POSTGRES_USER: <%= @repository_name %>
          POSTGRES_DB: <%= "#{@repository_name}_test" %>
          POSTGRES_PASSWORD: postgres
        ports: ["5432:5432"]
        options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5

    steps:
      - name: Checkout code
        uses: actions/checkout@v2
      - name: <%= "Set up Ruby #{@ruby_version}" %>
        uses: ruby/setup-ruby@v1
        with:
          ruby-version: <%= @ruby_version %>
          bundler-cache: true
      - name: Setup Node
        uses: actions/setup-node@v1
        with:
          node-version: <%= @node_version %>
      - name: Install library for postgres
        run: sudo apt-get install libpq-dev
      - name: Find yarn cache location
        id: yarn-cache
        run: echo "::set-output name=dir::$(yarn cache dir)"
      - name: JS package cache
        uses: actions/cache@v1
        with:
          path: ${{ steps.yarn-cache.outputs.dir }}
          key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
          restore-keys: |
            ${{ runner.os }}-yarn-
      - name: Install packages
        run: |
          yarn install --pure-lockfile
      - name: Setup test database
        env:
          RAILS_ENV: test
          PGHOST: localhost
          PGUSER: <%= @repository_name %>
          PGPASSWORD: postgres
        run: |
          bin/rails db:setup
      - name: Run tests
        env:
          RAILS_ENV: test
          PGHOST: localhost
          PGUSER: <%= @repository_name %>
          PGPASSWORD: postgres
        run: bundle exec rails test # TODO: Update the test runner command as per your requirement.

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
boring_generators-0.15.0 lib/generators/boring/ci/github_action/install/templates/ci.yml.tt
boring_generators-0.14.0 lib/generators/boring/ci/github_action/install/templates/ci.yml.tt
boring_generators-0.13.0 lib/generators/boring/ci/github_action/install/templates/ci.yml.tt
boring_generators-0.12.0 lib/generators/boring/ci/github_action/install/templates/ci.yml.tt
boring_generators-0.11.0 lib/generators/boring/ci/github_action/install/templates/ci.yml.tt