Skip to content

Commit

Permalink
fix ci (#861)
Browse files Browse the repository at this point in the history
  • Loading branch information
zubenkoivan committed Sep 17, 2024
1 parent 4b46905 commit ede93e1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 16 deletions.
11 changes: 3 additions & 8 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,19 @@ on:
tags: ['v*']
pull_request:
branches: [master]
pull_request_target:
branches: [master]
schedule:
- cron: 0 4 * * *

jobs:
test:
if: |
(github.event_name != 'pull_request_target' && !endsWith(github.actor, '[bot]')) ||
(github.event_name == 'pull_request_target' && endsWith(github.actor, '[bot]'))
name: All checks are passed
uses: ./.github/workflows/test.yaml

approve:
name: Approve bot PR
runs-on: ubuntu-latest
if: github.event_name == 'pull_request_target'
needs: [test]
if: endsWith(github.actor, '[bot]')
needs: test
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -35,7 +30,7 @@ jobs:
- name: metadata
id: metadata
if: github.actor == 'dependabot[bot]'
uses: dependabot/fetch-metadata@v2.2.0
uses: dependabot/fetch-metadata@v2
with:
github-token: ${{ steps.generate_token.outputs.token }}
- name: Enable auto-merge for bot PRs
Expand Down
16 changes: 8 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,20 @@ test_unit:
pytest -vv tests/unit

test_integration: docker_build
docker-compose -f tests/docker/docker-compose.yaml pull -q; \
docker-compose --project-directory=`pwd` -f tests/docker/docker-compose.yaml up -d; \
docker compose -f tests/docker/docker-compose.yaml pull -q; \
docker compose --project-directory=`pwd` -f tests/docker/docker-compose.yaml up -d; \
pytest -vv tests/integration; \
exit_code=$$?; \
docker-compose -f tests/docker/docker-compose.yaml kill; \
docker-compose -f tests/docker/docker-compose.yaml rm -f; \
docker compose -f tests/docker/docker-compose.yaml kill; \
docker compose -f tests/docker/docker-compose.yaml rm -f; \
exit $$exit_code

test_e2e: docker_build
docker-compose --project-directory=`pwd` -f tests/docker/docker-compose.yaml up -d registry; \
docker compose --project-directory=`pwd` -f tests/docker/docker-compose.yaml up -d registry; \
tests/e2e/tests.sh; \
exit_code=$$?; \
docker-compose -f tests/docker/docker-compose.yaml kill; \
docker-compose -f tests/docker/docker-compose.yaml rm -f; \
docker compose -f tests/docker/docker-compose.yaml kill; \
docker compose -f tests/docker/docker-compose.yaml rm -f; \
exit $$exit_code

docker_build: .docker_build
Expand All @@ -43,4 +43,4 @@ docker_build: .docker_build
touch .docker_build

build_up: docker_build
docker-compose --project-directory=`pwd` -f tests/docker/docker-compose.yaml up
docker compose --project-directory=`pwd` -f tests/docker/docker-compose.yaml up

0 comments on commit ede93e1

Please sign in to comment.