Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set the docker image tag to run #39

Merged
merged 2 commits into from
Jan 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Cache Docker images
uses: ScribeMD/[email protected]
with:
key: docker-v1-${{ runner.os }}-${{ hashFiles('package.json') }}
key: docker-v1-${{ runner.os }}-${{ hashFiles('.hass/config/.HA_VERSION', '.playwright_docker_version') }}
- name: Install deps
run: yarn install --frozen-lockfile
- name: E2E tests
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Cache Docker images
uses: ScribeMD/[email protected]
with:
key: docker-v1-${{ runner.os }}-${{ hashFiles('package.json') }}
key: docker-v1-${{ runner.os }}-${{ hashFiles('.hass/config/.HA_VERSION', '.playwright_docker_version') }}
- name: Install
run: yarn install --frozen-lockfile
- name: E2E tests
Expand Down
2 changes: 1 addition & 1 deletion .hass/config/.HA_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2024.1.0
2024.1.3
1 change: 1 addition & 0 deletions .playwright_docker_version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v1.40.0-jammy
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@
"test:run": "dotenv playwright test",
"test:open": "playwright test --ui",
"test:ts": "tsc --noEmit",
"start:ha": "docker run --rm -d -p8123:8123 --shm-size=512m -v ${PWD}/.hass/config:/config homeassistant/home-assistant:2024.1.0",
"stop:ha": "docker stop $(docker ps -a -q --filter ancestor=homeassistant/home-assistant:2024.1.0) || true",
"start:ha": "docker run --rm -d -p8123:8123 --shm-size=512m -v ${PWD}/.hass/config:/config homeassistant/home-assistant:${TAG:-$(cat .hass/config/.HA_VERSION)}",
"stop:ha": "docker stop $(docker ps -a -q --filter ancestor=homeassistant/home-assistant:${TAG:-$(cat .hass/config/.HA_VERSION)}) || true",
"reset:ha": "git add .hass/config/.HA_VERSION && git checkout .hass/config",
"demo": "yarn build && yarn start:ha",
"start:playwright": "docker run --rm --network host --add-host host.docker.internal:host-gateway -v $(pwd):/$(pwd)/ -w $(pwd) -i mcr.microsoft.com/playwright:v1.40.0-jammy sh -c \"yarn test:run && exit\"",
"start:playwright": "docker run --rm --network host --add-host host.docker.internal:host-gateway -v $(pwd):/$(pwd)/ -w $(pwd) -i mcr.microsoft.com/playwright:$(cat .playwright_docker_version) sh -c \"yarn test:run && exit\"",
"coverage:report": "nyc report --reporter=lcov --reporter=text-summary",
"prepare": "yarn build",
"prepublishOnly": "yarn test:all",
Expand Down
Loading