-
-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
491 changed files
with
9,823 additions
and
21,294 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
#### Build and tests all pushes, also code coverage | ||
name: 🛠️ CI build app model (temporary) | ||
on: | ||
push: | ||
branches: | ||
- app_model | ||
pull_request: | ||
branches: | ||
- app_model | ||
jobs: | ||
build: | ||
name: 🔨 Build sources (CI) | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: 📤 Checkout the repository | ||
uses: actions/checkout@main | ||
|
||
- name: 🥅 Install .Net 6 | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: "6.0.x" # SDK Version | ||
|
||
- name: 🔍 Enable problem matchers | ||
run: echo "::add-matcher::.github/matchers/dotnet.json" | ||
|
||
- name: 🛠️ Build code | ||
run: dotnet build /warnaserror | ||
|
||
- name: 👀 Test | ||
run: | | ||
dotnet test src/HassModel/NetDaemon.HassModel.Tests -v minimal /p:CollectCoverage=true /p:CoverletOutputFormat=json /p:MergeWith=${{github.workspace}}/codecover.json /p:CoverletOutput=${{github.workspace}}/codecover | ||
dotnet test src/Extensions/NetDaemon.Extensions.Scheduling.Tests -v minimal /p:CollectCoverage=true /p:CoverletOutputFormat=json /p:MergeWith=${{github.workspace}}/codecover.json /p:CoverletOutput=${{github.workspace}}/codecover | ||
dotnet test src/Client/NetDaemon.HassClient.Tests -v minimal /p:CollectCoverage=true /p:CoverletOutputFormat=json /p:MergeWith=${{github.workspace}}/codecover.json /p:CoverletOutput=${{github.workspace}}/codecover | ||
dotnet test src/Runtime/NetDaemon.Runtime.Tests -v minimal /p:CollectCoverage=true /p:CoverletOutputFormat=json /p:MergeWith=${{github.workspace}}/codecover.json /p:CoverletOutput=${{github.workspace}}/codecover | ||
dotnet test src/AppModel/NetDaemon.AppModel.Tests -v minimal /p:CollectCoverage=true /p:CoverletOutputFormat=lcov /p:MergeWith=${{github.workspace}}/codecover.json /p:CoverletOutput=${{github.workspace}}/codecover | ||
- name: 📨 Publish coverage report to coveralls.io | ||
uses: coverallsapp/github-action@master | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
path-to-lcov: ${{github.workspace}}/codecover.info | ||
|
||
- name: 📨 Publish coverage to codecov | ||
uses: codecov/codecov-action@v2 | ||
with: | ||
flags: unittests # optional | ||
name: codecov-umbrella # optional | ||
files: ${{github.workspace}}/codecover.info | ||
fail_ci_if_error: true # optional (default = false) |
This file contains 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
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
#### Publish tags to docker hub | ||
name: 📦 Deploy to Docker add-on with tag | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
tag: | ||
description: "Enter docker image tag" | ||
required: true | ||
default: "branch" | ||
|
||
jobs: | ||
deploy: | ||
name: 📦 Deploy to Docker add-on with tag | ||
runs-on: ubuntu-latest | ||
environment: CI - release environment | ||
steps: | ||
- name: 📤 Checkout the repository | ||
uses: actions/checkout@main | ||
- name: 📆 Set version number | ||
run: | | ||
sed -i '/ private const string Version = /c\ private const string Version = "feature build";' ${{github.workspace}}/src/Runtime/NetDaemon.Runtime/Internal/NetDaemonRuntime.cs | ||
sed -i '/ io.hass.version=/c\ io.hass.version="feature" \\' ${{github.workspace}}/Dockerfile.AddOn | ||
- name: 📎 Set up QEMU | ||
uses: docker/setup-qemu-action@v1 | ||
- name: 🔧 Set up Docker Buildx | ||
id: buildx | ||
uses: docker/setup-buildx-action@v1 | ||
- name: 🧰 Available platforms | ||
run: echo ${{ steps.buildx.outputs.platforms }} | ||
|
||
- name: 🔓 Login to Docker hub | ||
uses: docker/login-action@v1.10.0 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_TOKEN }} | ||
- name: 🔓 Login to GitHub Container Registry | ||
uses: docker/login-action@v1.10.0 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: 🛠️ Run Buildx | ||
run: | | ||
docker buildx build \ | ||
--platform linux/arm,linux/arm64,linux/amd64 \ | ||
--output "type=image,push=true" \ | ||
--no-cache \ | ||
--file ./Dockerfile.AddOn . \ | ||
--compress \ | ||
--tag "netdaemon/netdaemon3:feature-${{ github.event.inputs.tag }}" \ | ||
--tag "ghcr.io/net-daemon/netdaemon3:feature-${{ github.event.inputs.tag }}" |
This file contains 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
This file contains 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
Oops, something went wrong.