-
Notifications
You must be signed in to change notification settings - Fork 27
75 lines (69 loc) · 2.38 KB
/
jimm.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
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
- name: Checkout JIMM repo
uses: actions/checkout@v4
with:
repository: canonical/jimm
path: jimm
- name: Update dashboard paths
run: |
sed -i -e 's/JIMM_DASHBOARD_FINAL_REDIRECT_URL: "https:\/\/jaas.ai"/CORS_ALLOWED_ORIGINS: "http:\/\/127.0.0.1:8000"\n JIMM_DASHBOARD_LOCATION: "http:\/\/127.0.0.1:8000"\n JIMM_DASHBOARD_FINAL_REDIRECT_URL: "http:\/\/127.0.0.1:8000"/g' jimm/docker-compose.common.yaml
- 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/edge"
ghcr-pat: ${{ secrets.GITHUB_TOKEN }}
dump-logs: true
- 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"
- name: Install
run: yarn install --immutable
- name: Build
run: yarn build
- name: Configure
run: |
sed -i -e 's/controllerAPIEndpoint\:\ \"\"/controllerAPIEndpoint:\ "wss:\/\/jimm.localhost\/api"/g' build/config.js
sed -i -e 's/analyticsEnabled\:\ true/analyticsEnabled:\ false/g' build/config.js
- name: Install Playwright Browsers
run: yarn playwright install --with-deps
- name: Run Playwright tests
run: yarn playwright test
- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: test-results
path: test-results/
retention-days: 1
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
if: false
timeout-minutes: 15
with:
limit-access-to-actor: true