mirror of
https://github.com/lildude/ha-addon-teslamate.git
synced 2026-10-13 21:19:16 -04:00
Update and improve dev env, testing, building and publishing (#143)
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
name: Integration Test
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- config.json
|
||||
- Dockerfile
|
||||
- rootfs/**
|
||||
- .devcontainer/**
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- config.json
|
||||
- Dockerfile
|
||||
- rootfs/**
|
||||
- .devcontainer/**
|
||||
|
||||
jobs:
|
||||
integration:
|
||||
name: Integration test
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
steps:
|
||||
- name: Check out repository
|
||||
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||
|
||||
- name: Run integration test in devcontainer
|
||||
uses: devcontainers/ci@513af61f4de4f75d37e4438f184ba4358f0fc1ca # v0.3.1900000450
|
||||
with:
|
||||
env: |
|
||||
DEBUG=${{ vars.DEBUG }}
|
||||
GITHUB_ACTIONS=true
|
||||
runCmd: |
|
||||
if jq -e 'has("image")' config.json >/dev/null 2>&1; then
|
||||
jq 'del(.image)' config.json > config.json.tmp && mv config.json.tmp config.json
|
||||
fi
|
||||
|
||||
printf '#!/bin/sh\nexit 0\n' | sudo tee /usr/sbin/apparmor_parser > /dev/null && sudo chmod +x /usr/sbin/apparmor_parser
|
||||
sudo sed -i 's|docker run --rm --privileged|docker run --rm --privileged -v /usr/sbin/apparmor_parser:/usr/sbin/apparmor_parser:ro|' /usr/bin/supervisor_run
|
||||
if [ -n "${DEBUG:-}" ]; then
|
||||
supervisor_run &
|
||||
else
|
||||
supervisor_run > /dev/null 2>&1 &
|
||||
fi
|
||||
|
||||
bash .devcontainer/setup-ha.sh
|
||||
Reference in New Issue
Block a user