From 183f02066ba0fcb393ea37912be20a3dcab6e514 Mon Sep 17 00:00:00 2001 From: "joseph@dxw.com" Date: Thu, 7 Nov 2024 14:01:22 +0000 Subject: [PATCH] Update CI workflow --- .github/workflows/{build.yml => ci.yml} | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) rename .github/workflows/{build.yml => ci.yml} (77%) diff --git a/.github/workflows/build.yml b/.github/workflows/ci.yml similarity index 77% rename from .github/workflows/build.yml rename to .github/workflows/ci.yml index 76bb39a..b920c26 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/ci.yml @@ -1,9 +1,9 @@ -name: Build +name: CI on: [push] jobs: - build: + ci: runs-on: ubuntu-latest env: @@ -21,7 +21,8 @@ jobs: options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 steps: - - uses: actions/checkout@v4 + - name: Checkout code + uses: actions/checkout@v4 - name: Set up Ruby uses: ruby/setup-ruby@v1 with: @@ -29,22 +30,17 @@ jobs: - name: Set up Node uses: actions/setup-node@v4 with: - node-version: 16 + node-version: 20 - name: Install dependencies run: | - sudo apt-get -yqq install libpq-dev build-essential libcurl4-openssl-dev - gem install bundler - bundle install --jobs 4 --retry 3 yarn install - - name: Setup database and run tests + - name: Set up database and run tests run: | cp config/database.ci.yml config/database.yml bundle exec rake db:create db:migrate bundle exec rspec env: - PGHOST: localhost POSTGRES_DB: affordable_housing_monitoring_test POSTGRES_USER: affordable_housing_monitoring POSTGRES_PASSWORD: postgres PGPORT: ${{ job.services.postgres.ports[5432] }} - RAILS_ENV: test