From ca576234b2e61bc39b345b19938ecef3265cfa41 Mon Sep 17 00:00:00 2001 From: Rob Sterner Date: Sun, 19 Nov 2023 15:35:13 -0500 Subject: [PATCH] Let's see how this goes --- .github/workflows/rspec-test-suite.yml | 41 ++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/rspec-test-suite.yml diff --git a/.github/workflows/rspec-test-suite.yml b/.github/workflows/rspec-test-suite.yml new file mode 100644 index 00000000..cc4e9f8d --- /dev/null +++ b/.github/workflows/rspec-test-suite.yml @@ -0,0 +1,41 @@ +# This workflow uses actions that are not certified by GitHub. They are +# provided by a third-party and are governed by separate terms of service, +# privacy policy, and support documentation. +# +# This workflow will install a prebuilt Ruby version, install dependencies, and +# run tests and linters. +name: "run the rspec test suite" +on: + push: + branches: '**' + pull_request: + branches: '**' +jobs: + test: + runs-on: ubuntu-latest + services: + postgres: + image: postgres:15 + ports: + - "5432:5432" + env: + POSTGRES_DB: staffplan_redux_test + POSTGRES_USER: postgres + POSTGRES_PASSWORD: ${{ secrets.POSTGRES_PASSWORD }} + env: + RAILS_ENV: test + DATABASE_URL: "postgres://rails:password@localhost:5432/rails_test" + steps: + - name: Checkout code + uses: actions/checkout@v3 + # Add or replace dependency steps here + - name: Install Ruby and gems + uses: ruby/setup-ruby@55283cc23133118229fd3f97f9336ee23a179fcf # v1.146.0 + with: + bundler-cache: true + # Add or replace database setup steps here + - name: Set up database schema + run: bin/rails db:schema:load + # Add or replace test runners here + - name: Run tests + run: rspec