From 6d12a26b265a629f049a26600eaf41e090f04285 Mon Sep 17 00:00:00 2001 From: Richard Tibbles Date: Wed, 3 Jul 2024 09:20:29 -0700 Subject: [PATCH] Update morango integration tests to run when (in a pr) dependencies change or the workflow is altered --- .github/workflows/morongo_integration.yml | 26 ++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/.github/workflows/morongo_integration.yml b/.github/workflows/morongo_integration.yml index 9984be30824..0ede527f936 100644 --- a/.github/workflows/morongo_integration.yml +++ b/.github/workflows/morongo_integration.yml @@ -3,11 +3,31 @@ name: Morango Integration Tests on: schedule: - cron: '0 0 * * 0' + pull_request: + branches: + - develop + - release-* jobs: + pre_job: + name: Path match check + runs-on: ubuntu-latest + # Map a step output to a job output + outputs: + should_skip: ${{ steps.skip_check.outputs.should_skip }} + steps: + - id: skip_check + uses: fkirc/skip-duplicate-actions@master + with: + github_token: ${{ github.token }} + paths: '["requirements/base.txt", ".github/workflows/morango_integration.yml"]' morango_integration_tests_sqlite: name: Morango Integration Tests - runs-on: ubuntu-latest + needs: pre_job + if: needs.pre_job.outputs.should_skip != 'true' + runs-on: ubuntu-20.04 + env: + INTEGRATION_TESTS: true strategy: matrix: python-version: [3.6, 3.7, 3.8, 3.9, '3.10', '3.11'] @@ -47,7 +67,11 @@ jobs: morango_integration_tests_postgres: name: Morango Integration Tests with PostgreSQL + needs: pre_job + if: needs.pre_job.outputs.should_skip != 'true' runs-on: ubuntu-latest + env: + INTEGRATION_TESTS: true services: postgres: