From 4500f278220bd2bd902eaab1a6b75eddd47b8f3b Mon Sep 17 00:00:00 2001 From: Henne Vogelsang Date: Thu, 9 Nov 2023 14:14:56 +0100 Subject: [PATCH] Run postgres for unit/system tests Using dentarg/postgres --- .github/workflows/tests.yml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 4143675f..ebfd28b8 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -16,7 +16,7 @@ jobs: with: ruby-version: 3.1 bundler-cache: true - linter: + rubocop: needs: setup runs-on: ubuntu-latest steps: @@ -25,9 +25,9 @@ jobs: with: ruby-version: 3.1 bundler-cache: true - - name: Run linter + - name: Run rubocop run: bundle exec rubocop - haml-linter: + haml-lint: needs: setup runs-on: ubuntu-latest steps: @@ -36,12 +36,13 @@ jobs: with: ruby-version: 3.1 bundler-cache: true - - name: Run linter + - name: Run haml-lint run: bundle exec haml-lint app/views/ unit: - needs: [linter, haml-linter] + needs: [rubocop, haml-lint] runs-on: ubuntu-latest steps: + - uses: dentarg/postgres@v1 - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 with: @@ -50,9 +51,10 @@ jobs: - name: Run unit tests run: bundle exec rake test system: - needs: [linter, haml-linter] + needs: [rubocop, haml-lint] runs-on: ubuntu-latest steps: + - uses: dentarg/postgres@v1 - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 with: @@ -60,3 +62,6 @@ jobs: bundler-cache: true - name: Run system tests run: bundle exec rake test:system + env: + DATABASE_URL: "${{ env.POSTGRES_URL }}" +