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 workflows 3 #3

Merged
merged 3 commits into from
Jan 16, 2024
Merged
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
22 changes: 13 additions & 9 deletions .github/workflows/api-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,32 @@ name: API Pull Request Github Labeler
on:
workflow_run:
workflows:
- Test depends Github Labeler
- Github Labeler
types:
- completed


jobs:
test-job:
if: ${{ github.event_name == 'push' || contains( github.event.pull_request.labels.*.name, 'github') || contains( github.event.pull_request.labels.*.name, 'api') }}
name: API Unit Tests
runs-on: ubuntu-latest

steps:
- name: Install requirements
run: pip install -r requirements.txt
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'pip' # caching pip dependencies
- run: pip install -r requirements.txt
# - name: Install requirements
# run: pip install -r requirements.txt
- name: Run Tests
run: pytest

# defaults:
# run:
# working-directory: test
# working-directory: testd

# jobs:
# test-job:
Expand All @@ -29,7 +37,6 @@ jobs:
# - 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 @@ -41,10 +48,7 @@ jobs:
# ports: ['5432:5432']
# options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5

# strategy:
# max-parallel: 2
# matrix:
# python-version: ['3.10', '3.11']


# - uses: actions/setup-python@v4
# with:
Expand Down