mirror of
https://github.com/safing/portmaster
synced 2025-04-12 23:19:10 +00:00
Add github actions workflow for angular
This commit is contained in:
parent
4e4ad4437b
commit
29a0cdba3b
9 changed files with 131 additions and 170 deletions
10
.github/dependabot.yml
vendored
10
.github/dependabot.yml
vendored
|
@ -9,3 +9,13 @@ updates:
|
|||
directory: "/"
|
||||
schedule:
|
||||
interval: "daily"
|
||||
|
||||
- package-ecosystem: "npm"
|
||||
directory: "/desktop/angular"
|
||||
schedule:
|
||||
interval: "daily"
|
||||
|
||||
- package-ecosystem: "cargo"
|
||||
directory: "/desktop/tauri"
|
||||
schedule:
|
||||
interval: "daily"
|
61
.github/workflows/angular.yml
vendored
Normal file
61
.github/workflows/angular.yml
vendored
Normal file
|
@ -0,0 +1,61 @@
|
|||
name: Angular
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- 'desktop/angular/**'
|
||||
branches:
|
||||
- master
|
||||
- develop
|
||||
- migration/mono-repo
|
||||
|
||||
pull_request:
|
||||
paths:
|
||||
- 'desktop/angular/**'
|
||||
branches:
|
||||
- master
|
||||
- develop
|
||||
- migration/mono-repo
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
name: Linter
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
working-directory: desktop/angular
|
||||
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18
|
||||
|
||||
- run: npm install
|
||||
|
||||
- uses: sibiraj-s/action-eslint@v3
|
||||
with:
|
||||
annotations: true
|
||||
extensions: 'ts,html'
|
||||
working-directory: desktop/angular
|
||||
|
||||
test:
|
||||
name: Build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: earthly/actions-setup@v1
|
||||
with:
|
||||
version: v0.8.0
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Log in to the Container registry
|
||||
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Build angular projects
|
||||
run: earthly --ci --remote-cache=ghcr.io/safing/build-cache --push +build-angular
|
12
.github/workflows/go.yml
vendored
12
.github/workflows/go.yml
vendored
|
@ -45,5 +45,13 @@ jobs:
|
|||
with:
|
||||
version: v0.8.0
|
||||
- uses: actions/checkout@v4
|
||||
- name: Run tests
|
||||
run: earthly --ci +test-go --TESTFLAGS="-short"
|
||||
|
||||
- name: Log in to the Container registry
|
||||
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Build angular projects
|
||||
run: earthly --ci --remote-cache=ghcr.io/safing/build-cache --push +test-go --TESTFLAGS="-short"
|
||||
|
|
38
.github/workflows/tauri.yml
vendored
Normal file
38
.github/workflows/tauri.yml
vendored
Normal file
|
@ -0,0 +1,38 @@
|
|||
name: Tauri
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- 'desktop/tauri/**'
|
||||
branches:
|
||||
- master
|
||||
- develop
|
||||
- migration/mono-repo
|
||||
|
||||
pull_request:
|
||||
paths:
|
||||
- 'desktop/tauri/**'
|
||||
branches:
|
||||
- master
|
||||
- develop
|
||||
- migration/mono-repo
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: earthly/actions-setup@v1
|
||||
with:
|
||||
version: v0.8.0
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Log in to the Container registry
|
||||
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Build angular projects
|
||||
run: earthly --ci --remote-cache=ghcr.io/safing/build-cache --push +tauri-release
|
|
@ -66,11 +66,11 @@ go-base:
|
|||
|
||||
LET version = $(git tag --points-at)
|
||||
IF [ "${version}" = "" ]
|
||||
SET version = $(git describe --tags --abbrev=0 || echo "dev build")
|
||||
SET version = $(git describe --tags --abbrev=0 || echo "dev_build")
|
||||
END
|
||||
ENV VERSION="${version}"
|
||||
|
||||
LET source = $( ( git remote -v | cut -f2 | cut -d" " -f1 | head -n 1 ) || echo "unknown source" )
|
||||
LET source = $( ( git remote -v | cut -f2 | cut -d" " -f1 | head -n 1 ) || echo "unknown_source" )
|
||||
ENV SOURCE="${source}"
|
||||
|
||||
# updates all go dependencies and runs go mod tidy, saving go.mod and go.sum locally.
|
||||
|
@ -222,6 +222,11 @@ angular-project:
|
|||
SAVE ARTIFACT "./${project}.zip" AS LOCAL ${outputDir}/${project}.zip
|
||||
SAVE ARTIFACT "./dist" AS LOCAL ${outputDir}/${project}
|
||||
|
||||
# Builds all angular projects
|
||||
build-angular:
|
||||
BUILD +angular-project --project=portmaster --dist=./dist --configuration=development --baseHref=/ui/modules/portmaster/
|
||||
BUILD +angular-project --project=tauri-builtin --dist=./dist/tauri-builtin --configuration=development --baseHref=/
|
||||
|
||||
# Build the angular projects (portmaster-UI and tauri-builtin) in production mode
|
||||
angular-release:
|
||||
BUILD +angular-project --project=portmaster --dist=./dist --configuration=production --baseHref=/ui/modules/portmaster/
|
||||
|
|
|
@ -3,6 +3,9 @@
|
|||
"ignorePatterns": [
|
||||
"projects/**/*"
|
||||
],
|
||||
"parserOptions": {
|
||||
"tsconfigRootDir": "desktop/angular"
|
||||
},
|
||||
"overrides": [
|
||||
{
|
||||
"files": [
|
||||
|
|
|
@ -96,7 +96,6 @@
|
|||
"protractor": "~7.0.0",
|
||||
"tailwindcss": "^3.3.2",
|
||||
"ts-node": "^10.9.1",
|
||||
"tslint": "~6.1.0",
|
||||
"typescript": "4.9",
|
||||
"webpack-bundle-analyzer": "^4.8.0",
|
||||
"webpack-ext-reloader": "^1.1.9",
|
||||
|
|
|
@ -117,12 +117,7 @@ export const supportTypes: PageSections[] = [
|
|||
includeDebugData: true,
|
||||
privateTicket: true,
|
||||
ghIssuePreset: "report-bug.md",
|
||||
repositories: [
|
||||
{ repo: 'portmaster', name: 'Portmaster Core' },
|
||||
{ repo: 'portmaster-ui', name: 'User Interface' },
|
||||
{ repo: 'portmaster-packaging', name: 'Packaging & Installers' },
|
||||
{ repo: 'spn', name: 'SPN' },
|
||||
]
|
||||
repositories: []
|
||||
},
|
||||
{
|
||||
id: "give-feedback",
|
||||
|
@ -140,12 +135,7 @@ export const supportTypes: PageSections[] = [
|
|||
includeDebugData: false,
|
||||
privateTicket: true,
|
||||
ghIssuePreset: "suggest-feature.md",
|
||||
repositories: [
|
||||
{ repo: 'portmaster', name: 'Portmaster Core' },
|
||||
{ repo: 'portmaster-ui', name: 'User Interface' },
|
||||
{ repo: 'portmaster-packaging', name: 'Packaging & Installers' },
|
||||
{ repo: 'spn', name: 'SPN' },
|
||||
]
|
||||
repositories: []
|
||||
},
|
||||
{
|
||||
id: "compatibility-report",
|
||||
|
|
|
@ -1,153 +0,0 @@
|
|||
{
|
||||
"extends": "tslint:recommended",
|
||||
"rules": {
|
||||
"align": {
|
||||
"options": [
|
||||
"parameters",
|
||||
"statements"
|
||||
]
|
||||
},
|
||||
"array-type": false,
|
||||
"arrow-return-shorthand": true,
|
||||
"curly": true,
|
||||
"deprecation": {
|
||||
"severity": "warning"
|
||||
},
|
||||
"component-class-suffix": true,
|
||||
"contextual-lifecycle": true,
|
||||
"directive-class-suffix": true,
|
||||
"directive-selector": [
|
||||
true,
|
||||
"attribute",
|
||||
"app",
|
||||
"camelCase"
|
||||
],
|
||||
"component-selector": [
|
||||
true,
|
||||
"element",
|
||||
"app",
|
||||
"kebab-case"
|
||||
],
|
||||
"eofline": true,
|
||||
"import-blacklist": [
|
||||
true,
|
||||
"rxjs/Rx"
|
||||
],
|
||||
"import-spacing": true,
|
||||
"indent": {
|
||||
"options": [
|
||||
"spaces"
|
||||
]
|
||||
},
|
||||
"max-classes-per-file": false,
|
||||
"max-line-length": [
|
||||
true,
|
||||
140
|
||||
],
|
||||
"member-ordering": [
|
||||
true,
|
||||
{
|
||||
"order": [
|
||||
"static-field",
|
||||
"instance-field",
|
||||
"static-method",
|
||||
"instance-method"
|
||||
]
|
||||
}
|
||||
],
|
||||
"no-any": true,
|
||||
"no-console": [
|
||||
true,
|
||||
"debug",
|
||||
"info",
|
||||
"time",
|
||||
"timeEnd",
|
||||
"trace"
|
||||
],
|
||||
"no-empty": false,
|
||||
"no-inferrable-types": [
|
||||
true,
|
||||
"ignore-params"
|
||||
],
|
||||
"no-non-null-assertion": true,
|
||||
"no-redundant-jsdoc": true,
|
||||
"no-switch-case-fall-through": true,
|
||||
"no-var-requires": false,
|
||||
"object-literal-key-quotes": [
|
||||
true,
|
||||
"as-needed"
|
||||
],
|
||||
"quotemark": [
|
||||
true,
|
||||
"single"
|
||||
],
|
||||
"semicolon": {
|
||||
"options": [
|
||||
"always"
|
||||
]
|
||||
},
|
||||
"space-before-function-paren": {
|
||||
"options": {
|
||||
"anonymous": "never",
|
||||
"asyncArrow": "always",
|
||||
"constructor": "never",
|
||||
"method": "never",
|
||||
"named": "never"
|
||||
}
|
||||
},
|
||||
"typedef": [
|
||||
true,
|
||||
"call-signature"
|
||||
],
|
||||
"typedef-whitespace": {
|
||||
"options": [
|
||||
{
|
||||
"call-signature": "nospace",
|
||||
"index-signature": "nospace",
|
||||
"parameter": "nospace",
|
||||
"property-declaration": "nospace",
|
||||
"variable-declaration": "nospace"
|
||||
},
|
||||
{
|
||||
"call-signature": "onespace",
|
||||
"index-signature": "onespace",
|
||||
"parameter": "onespace",
|
||||
"property-declaration": "onespace",
|
||||
"variable-declaration": "onespace"
|
||||
}
|
||||
]
|
||||
},
|
||||
"variable-name": {
|
||||
"options": [
|
||||
"ban-keywords",
|
||||
"check-format",
|
||||
"allow-pascal-case"
|
||||
]
|
||||
},
|
||||
"whitespace": {
|
||||
"options": [
|
||||
"check-branch",
|
||||
"check-decl",
|
||||
"check-operator",
|
||||
"check-separator",
|
||||
"check-type",
|
||||
"check-typecast"
|
||||
]
|
||||
},
|
||||
"no-conflicting-lifecycle": true,
|
||||
"no-host-metadata-property": true,
|
||||
"no-input-rename": true,
|
||||
"no-inputs-metadata-property": true,
|
||||
"no-output-native": true,
|
||||
"no-output-on-prefix": true,
|
||||
"no-output-rename": true,
|
||||
"no-outputs-metadata-property": true,
|
||||
"template-banana-in-box": true,
|
||||
"template-no-negated-async": true,
|
||||
"use-lifecycle-interface": true,
|
||||
"use-pipe-transform-interface": true
|
||||
},
|
||||
"rulesDirectory": [
|
||||
"codelyzer"
|
||||
]
|
||||
}
|
Loading…
Add table
Reference in a new issue