From 19c1aae4c6464ee038df353e8c70fbbbedb05268 Mon Sep 17 00:00:00 2001 From: Huw Wilkins Date: Mon, 24 Feb 2025 14:27:30 +1100 Subject: [PATCH] test --- .github/workflows/jimm.yml | 58 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 .github/workflows/jimm.yml diff --git a/.github/workflows/jimm.yml b/.github/workflows/jimm.yml new file mode 100644 index 000000000..21dbe0602 --- /dev/null +++ b/.github/workflows/jimm.yml @@ -0,0 +1,58 @@ +name: Integration Test + +on: + pull_request: + +jobs: + startjimm: + name: Test JIMM with Juju controller + runs-on: ubuntu-22.04 + strategy: + matrix: + node-version: [20.x] + steps: + - name: Checkout Juju Dashboard repo + uses: actions/checkout@v4 + with: + path: juju-dashboard + - name: Checkout JIMM repo + uses: actions/checkout@v4 + with: + repository: canonical/jimm + path: jimm + + - name: Setup Go + uses: actions/setup-go@v4 + with: + go-version-file: 'jimm/go.mod' + + - name: Go vendor to speed up docker build + run: cd jimm && go mod vendor + + - name: Start JIMM (pull request) + uses: ./jimm/.github/actions/test-server + with: + jimm-version: dev + juju-channel: "3/stable" + ghcr-pat: ${{ secrets.GITHUB_TOKEN }} + + - name: Create a model, deploy an application and run juju status + run: | + juju add-model foo && \ + juju deploy haproxy && \ + sleep 5 && \ + juju status + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + cache: "yarn" + cache-dependency-path: "juju-dashboard" + - name: Install + run: yarn --cwd juju-dashboard install --immutable + - name: Build + run: yarn --cwd juju-dashboard build + - name: Configure + run: sed -i -e 's/controllerAPIEndpoint\:\ \"\"/controllerAPIEndpoint:\ "ws:\/\/jimm.localhost\/api"/g' juju-dashboard/build/config.js + - name: Start + run: npx http-server juju-dashboard/build --port 8000 &