name: CI

on:
  push:
  pull_request:
    branches:
      - main

jobs:
  ci:
    name: CI
    runs-on: debian-latest
    env:
      DATABASE_URL: postgres://postgres@localhost:5433/flatshare_app_test

    services:
      db:
        image: postgres:10.13
        ports: ["5433:5432"]
        env:
          POSTGRES_HOST_AUTH_METHOD: trust
          POSTGRES_DB: flatshare_app_test

    steps:
      - name: Checkout code
        id: checkout-code
        uses: actions/checkout@v2
      - name: Set up Ruby
        uses: ruby/setup-ruby@v1
        with:
          ruby-version: 2.7.5
          bundler-cache: true
      # - name: Install bundler
      #   id: install-bundler
      #   run: gem install bundler
      # - name: Install dependencies
      #   id: install-dependencies
      #   run: bundle install
      - name: Run Spec
        id: run-spec
        env:
          RAILS_ENV: test
        run: |
          cp config/database.yml.sample config/database.yml
          bundle exec rake

name: CI

on:
  push:
  pull_request:
    branches:
      - main

jobs:
  ci:
    name: CI
    runs-on: ubuntu-20.04
    env:
      DATABASE_URL: postgres://postgres@localhost:5433/flatshare_app_test

    services:
      db:
        image: postgres:10.13
        ports: ["5433:5432"]
        env:
          POSTGRES_HOST_AUTH_METHOD: trust
          POSTGRES_DB: flatshare_app_test

    steps:
      - name: Checkout code
        id: checkout-code
        uses: actions/checkout@v2
      - name: Set up Ruby
        uses: ruby/setup-ruby@v1
        with:
          ruby-version: 2.7.5
          bundler-cache: true
      # - name: Install bundler
      #   id: install-bundler
      #   run: gem install bundler
      # - name: Install dependencies
      #   id: install-dependencies
      #   run: bundle install
      - name: Run Spec
        id: run-spec
        env:
          RAILS_ENV: test
        run: |
          cp config/database.yml.sample config/database.yml
          bundle exec rake

Change OS label to ubuntu-20.04
Change OS label to ubuntu-20.04