Skip to content

Commit

Permalink
Configure Circle CI to run Integration Test (#1769)
Browse files Browse the repository at this point in the history
Co-authored-by: Pritesh Arora <[email protected]>
  • Loading branch information
pritt20 and Pritesh Arora authored Dec 23, 2024
1 parent 76ea818 commit 7b75a8e
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 1 deletion.
43 changes: 43 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ jobs:
- image: quay.io/astronomer/ap-dind-golang:24.0.6
steps:
- test
integration-test:
machine:
resource_class: medium
image: ubuntu-2204:current
steps:
- integration-test
new-tag:
executor: docker-executor
steps:
Expand All @@ -34,6 +40,13 @@ workflows:
jobs:
- lint
- test
- approve-run-integration-tests:
type: approval
- integration-test:
requires:
- lint
- test
- approve-run-integration-tests
- approve-release:
requires:
- lint
Expand Down Expand Up @@ -90,6 +103,36 @@ commands:
command: |
make test
bash -c "bash <(curl -s https://codecov.io/bash)"
integration-test:
description: "Run integration tests"
steps:
- checkout
- run:
name: Install Go
command: |
set -e
cd /tmp
curl -Lo go.tar.gz https://go.dev/dl/go1.23.4.linux-amd64.tar.gz
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xvf go.tar.gz
GOROOT=/usr/local/go go version
echo 'export GOROOT=/usr/local/go' >> $BASH_ENV
- run:
name: Setup python env
command: |
pyenv install --skip-existing 3.11.1
pyenv global 3.11.1
pip install poetry
- run:
name: Build astro cli
command: make build
- run:
name: Run integration test
command: |
python -m venv penv
. penv/bin/activate
cd integration-test && poetry install --no-root
pytest -x -s -v dev_test.py
commit-next-tag:
description: "Tag the commit to the release branch major.minor with the patch number incremented by one"
parameters:
Expand Down
2 changes: 1 addition & 1 deletion integration-test/dev_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def test_dev_init(temp_dir):
def test_dev_start(docker_client):
# Run `astro dev start` command
result = subprocess.run(
[ASTRO, "dev", "start"],
[ASTRO, "dev", "start", "--no-browser"],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
text=True,
Expand Down

0 comments on commit 7b75a8e

Please sign in to comment.