Skip to content

Commit

Permalink
ci: add image e2e tests
Browse files Browse the repository at this point in the history
Signed-off-by: peefy <[email protected]>
  • Loading branch information
Peefy committed Aug 15, 2024
1 parent e9d172d commit 838a241
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go 1.22
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/example-e2e-tests.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: example-e2e-test
name: example-e2e-tests
on:
pull_request:
branches:
Expand All @@ -22,7 +22,7 @@ jobs:
shell: bash -ieo pipefail {0}
run: PATH=$PATH:$HOME/go/bin ./examples/test.sh

- name: run concurrent e2e
- name: Run concurrent e2e tests
run: PATH=$PATH:$HOME/go/bin ./scripts/concurrent_test.sh

macos:
Expand All @@ -46,7 +46,7 @@ jobs:
shell: bash -ieo pipefail {0}
run: PATH=$PATH:$HOME/go/bin ./examples/test.sh

- name: run concurrent e2e
- name: Run concurrent e2e tests
run: PATH=$PATH:$HOME/go/bin ./scripts/concurrent_test.sh

windows:
Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/image-e2e-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: image-e2e-tests
on:
pull_request:
branches:
- main
push:
branches:
- main

jobs:
build-and-test:
name: Test
runs-on: ubuntu-latest
container:
image: kcllang/kcl
steps:
- name: Check out code
uses: actions/checkout@v4
with:
submodules: 'true'
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Install dependencies
run: apt-get install make
- name: Example tests
run: ./examples/test.sh
- name: Run concurrent e2e tests
run: ./scripts/concurrent_test.sh
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ ARG TARGETARCH
COPY --from=build /src/bin/kcl /usr/local/bin/kcl
RUN /usr/local/bin/kcl
RUN cp -r /root/go/bin/* /usr/local/bin/
RUN apt-get update && apt-get install gcc git -y && rm -rf /var/lib/apt/lists/*
RUN apt-get update && apt-get install gcc make git -y && rm -rf /var/lib/apt/lists/*
# The reason for doing this below is to prevent the
# container from not having write permissions.
ENV KCL_PKG_PATH=/tmp
Expand Down

0 comments on commit 838a241

Please sign in to comment.