Merge pull request #292 from kcl-lang/dependabot/github_actions/actio… #718
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: example-e2e-tests | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| ubuntu: | |
| strategy: | |
| matrix: | |
| os: [ ubuntu-22.04, ubuntu-latest ] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: go.mod | |
| - name: KCL Installation | |
| run: go install ./cmd/kcl | |
| - name: Example tests | |
| shell: bash -ieo pipefail {0} | |
| run: PATH=$PATH:$HOME/go/bin ./examples/test.sh | |
| - name: Run concurrent e2e tests | |
| run: PATH=$PATH:$HOME/go/bin ./scripts/concurrent_test.sh | |
| macos: | |
| strategy: | |
| matrix: | |
| os: [ macos-15-intel, macos-latest ] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: go.mod | |
| - name: KCL Installation | |
| run: go install ./cmd/kcl | |
| - name: e2e tests | |
| run: PATH=$PATH:$HOME/go/bin kcl ./examples/kubernetes.k | |
| - name: Example tests | |
| shell: bash -ieo pipefail {0} | |
| run: PATH=$PATH:$HOME/go/bin ./examples/test.sh | |
| - name: Run concurrent e2e tests | |
| run: PATH=$PATH:$HOME/go/bin ./scripts/concurrent_test.sh | |
| windows: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install Make | |
| run: choco install make -y | |
| - name: KCL Installation and Tests | |
| shell: powershell | |
| run: | | |
| iwr -useb get.scoop.sh -outfile 'install.ps1' | |
| .\install.ps1 -RunAsAdmin | |
| scoop bucket add kcl-lang https://github.com/kcl-lang/scoop-bucket.git | |
| scoop install kcl-lang/kcl | |
| kcl.exe .\examples\kubernetes.k | |
| .\examples\test.ps1 | |
| musl: | |
| runs-on: ubuntu-latest | |
| container: golang:1.24-alpine | |
| steps: | |
| - name: Git checkout | |
| uses: actions/checkout@v6 | |
| - name: Install musl dependencies (Alpine container) | |
| run: | | |
| apk add --no-cache \ | |
| musl-dev \ | |
| gcc \ | |
| git \ | |
| make \ | |
| linux-headers | |
| - name: KCL Installation | |
| run: | | |
| CGO_ENABLED=1 go build -tags="musl netgo static osusergo" -ldflags="-linkmode external -extldflags '-static'" ./cmd/kcl | |
| mkdir -p $HOME/go/bin | |
| cp -f ./kcl $HOME/go/bin | |
| env: | |
| CGO_LDFLAGS: '-static' | |
| - name: e2e tests | |
| run: PATH=$PATH:$HOME/go/bin kcl ./examples/kubernetes.k |