Skip to content

Commit

Permalink
[AXON-37] chore: Run E2E tests in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
sdzh-atlassian committed Dec 16, 2024
1 parent 83ff910 commit da35395
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 3 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/build-e2e-image.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Build E2E Image

on:
workflow_dispatch: {}

jobs:

build-e2e-docker-image:

runs-on: ubuntu-latest

steps:

- uses: actions/checkout@v4

- name: Build the Docker image
run: |
docker build \
--platform linux/amd64 \
--tag ghcr.io/atlassian/atlascode-e2e:$GITHUB_SHA \
--tag ghcr.io/atlassian/atlascode-e2e:latest \
- <e2e/Dockerfile
- name: Log in to registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin

- name: Push the Docker image
run: |
docker push ghcr.io/atlassian/atlascode-e2e:$GITHUB_SHA
docker push ghcr.io/atlassian/atlascode-e2e:latest
8 changes: 6 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ jobs:
- name: Run unit tests
run: npm run test

- name: Build the extension
run: npm run extension:package
- name: Fetch E2E image
run: |
docker pull ghcr.io/atlassian/atlascode-e2e:latest
docker tag ghcr.io/atlassian/atlascode-e2e:latest atlascode-e2e
- name: Run E2E tests
run: npm run e2e:docker
9 changes: 9 additions & 0 deletions .github/workflows/release-nightly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,15 @@ jobs:
- name: Run unit tests
run: npm run test

- name: Fetch E2E image
run: |
docker pull ghcr.io/atlassian/atlascode-e2e:latest
docker tag ghcr.io/atlassian/atlascode-e2e:latest atlascode-e2e
- name: Run E2E tests
run: npm run e2e:docker

# TODO: might want to run this first, and reuse the .vsix in E2E tests instead
- name: Build the extension
run: npm run extension:package:prerelease

Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,15 @@ jobs:
- name: Run unit tests
run: npm run test

- name: Fetch E2E image
run: |
docker pull ghcr.io/atlassian/atlascode-e2e:latest
docker tag ghcr.io/atlassian/atlascode-e2e:latest atlascode-e2e
- name: Run E2E tests
run: npm run e2e:docker

# TODO: might want to run this first, and reuse the .vsix in E2E tests instead
- name: Build the extension
run: npm run extension:package

Expand Down
2 changes: 1 addition & 1 deletion e2e/scripts/in-docker
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ docker run \
--platform linux/amd64 \
-v $(pwd):/atlascode \
--user atlascode \
-it \
$([ -z "$CI" ] && echo "-it" || echo "") \
atlascode-e2e $@

0 comments on commit da35395

Please sign in to comment.