From a208273512502de35aacfc0e402bd6d8cf972b49 Mon Sep 17 00:00:00 2001 From: Novak Zaballa Date: Tue, 16 Jan 2024 11:49:19 -0400 Subject: [PATCH 1/3] ci: Test workflows 3 --- .github/workflows/api-pull-request.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/api-pull-request.yml b/.github/workflows/api-pull-request.yml index 113859f..f74d30e 100644 --- a/.github/workflows/api-pull-request.yml +++ b/.github/workflows/api-pull-request.yml @@ -19,7 +19,7 @@ jobs: # defaults: # run: -# working-directory: test +# working-directory: testd # jobs: # test-job: From bd2dd879802bc16f17d6e30640ec942e8c11e76c Mon Sep 17 00:00:00 2001 From: Novak Zaballa Date: Tue, 16 Jan 2024 11:58:42 -0400 Subject: [PATCH 2/3] add condition in API Pull Request Github Labeler --- .github/workflows/api-pull-request.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/api-pull-request.yml b/.github/workflows/api-pull-request.yml index f74d30e..9523738 100644 --- a/.github/workflows/api-pull-request.yml +++ b/.github/workflows/api-pull-request.yml @@ -2,13 +2,14 @@ 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: @@ -29,7 +30,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: From 4edd9832e4298281a135a41f26f3bdb5efa15568 Mon Sep 17 00:00:00 2001 From: Novak Zaballa Date: Tue, 16 Jan 2024 12:07:51 -0400 Subject: [PATCH 3/3] install requeriments test --- .github/workflows/api-pull-request.yml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/api-pull-request.yml b/.github/workflows/api-pull-request.yml index 9523738..34dacc2 100644 --- a/.github/workflows/api-pull-request.yml +++ b/.github/workflows/api-pull-request.yml @@ -12,9 +12,16 @@ jobs: 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 @@ -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: