Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci/test-workflows2 #2

Merged
merged 9 commits into from
Jan 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 24 additions & 18 deletions .github/workflows/api-pull-request.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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 }}
Expand Down Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/github-labeler.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
name: Github Labeler

on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
Expand Down
27 changes: 14 additions & 13 deletions .github/workflows/test-depends-workflow.yml
Original file line number Diff line number Diff line change
@@ -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'
- name: 'Trigger'
run: echo 'The triggering workflow passed'