diff --git a/.github/workflows/api-pull-request.yml b/.github/workflows/api-pull-request.yml index c3a43e7..113859f 100644 --- a/.github/workflows/api-pull-request.yml +++ b/.github/workflows/api-pull-request.yml @@ -1,20 +1,35 @@ -name: API Pull Request - +name: API Pull Request Github Labeler on: workflow_run: - workflows: ['Github Labeler'] - types: + workflows: + - Test depends Github Labeler + types: - completed + +jobs: + test-job: + name: API Unit Tests + runs-on: ubuntu-latest + steps: + - name: Install requirements + run: pip install -r requirements.txt + - name: Run Tests + run: pytest + # defaults: # run: # working-directory: test -jobs: - test: - if: ${{ github.event_name == 'push' || contains( github.event.pull_request.labels.*.name, 'github') || contains( github.event.pull_request.labels.*.name, 'api') }} - runs-on: General-Purpose-8c-Runner - name: API Unit Tests +# jobs: +# test-job: +# name: Test Step +# runs-on: ubuntu-latest +# steps: +# - name: 'Trigger' +# run: echo 'The triggering workflow passed' + + # if: ${{ github.event_name == 'push' || contains( github.event.pull_request.labels.*.name, 'github') || contains( github.event.pull_request.labels.*.name, 'api') }} # services: # postgres: @@ -31,13 +46,6 @@ jobs: # matrix: # python-version: ['3.10', '3.11'] - steps: - - name: Cloning repo - uses: actions/checkout@v3 - - - name: Install requirements - run: pip install -r requirements.txt - # - uses: actions/setup-python@v4 # with: # python-version: ${{ matrix.python-version }} @@ -72,8 +80,6 @@ jobs: # key: testmon-data-python${{ matrix.python-version }}-${{ github.event.pull_request.base.sha }} # restore-keys: testmon-data-python${{ matrix.python-version }}- - - name: Run Tests - run: pytest # - name: Save testmon data cache # id: cache-testmon-save diff --git a/.github/workflows/github-labeler.yml b/.github/workflows/github-labeler.yml index defa3c2..0173c35 100644 --- a/.github/workflows/github-labeler.yml +++ b/.github/workflows/github-labeler.yml @@ -1,5 +1,4 @@ name: Github Labeler - on: pull_request: types: [opened, synchronize, reopened, ready_for_review] diff --git a/.github/workflows/test-depends-workflow.yml b/.github/workflows/test-depends-workflow.yml index bde24f0..a833320 100644 --- a/.github/workflows/test-depends-workflow.yml +++ b/.github/workflows/test-depends-workflow.yml @@ -1,21 +1,22 @@ -name: Test depends workflow - -# on: -# # pull_request: -# # types: [opened, synchronize, reopened, ready_for_review] -# workflow_run: -# workflows: ["Github Labeler"] -# types: -# - completed - +name: Test depends Github Labeler on: workflow_run: - workflows: [Github Labeler] + workflows: + - Github Labeler types: - completed +# on: +# workflow_call: +# workflows: +# - Github Labeler +# types: +# - completed + jobs: - on-success: + test-job: + name: Test Step runs-on: ubuntu-latest steps: - - run: echo 'The triggering workflow passed' \ No newline at end of file + - name: 'Trigger' + run: echo 'The triggering workflow passed'