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

Configure Circle CI to run Integration Test #1769

Merged
merged 6 commits into from
Dec 23, 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
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