Skip to content

Commit

Permalink
Merge pull request #1461 from safing/migration/mono-repo
Browse files Browse the repository at this point in the history
Migrate to mono-repo
  • Loading branch information
dhaavi authored Mar 29, 2024
2 parents b30fd00 + 29e7e13 commit 6090518
Show file tree
Hide file tree
Showing 1,562 changed files with 133,182 additions and 1,160 deletions.
4 changes: 4 additions & 0 deletions .angulardoc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"repoId": "8f466ce7-4b75-4048-8b8a-cad5bf173aa0",
"lastSync": 0
}
22 changes: 0 additions & 22 deletions .ci-inject-internal-deps.sh

This file was deleted.

25 changes: 25 additions & 0 deletions .earthlyignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
go.work
go.work.sum

dist/
node_modules/

desktop/angular/node_modules
desktop/angular/dist
desktop/angular/dist-lib
desktop/angular/dist-extension
desktop/angular/.angular

# Assets are ignored here because the symlink wouldn't work in
# the buildkit container so we copy the assets directly in Earthfile.
desktop/angular/assets


desktop/tauri/src-tauri/target
.gitignore
AUTHORS
CODE_OF_CONDUCT.md
LICENSE
README.md
TESTING.md
TRADEMARKS
20 changes: 6 additions & 14 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,18 @@
blank_issues_enabled: true # default: true
contact_links:

# - name: "🛠 Create Issue for Portmaster"
# url: https://github.com/safing/portmaster/issues/new/choose
# about: "Create issue related to the main application"
- name: "Ask Questions on Discord"
url: https://safing.io/discord
about: Get help from our great community

- name: "🎨 Create Issue for User Interface"
url: https://github.com/safing/portmaster-ui/issues/new/choose
about: "Create issue for everything connected to the Portmaster's User Interface"

- name: "📦 Create Issue for Packaging & Installers"
url: https://github.com/safing/portmaster-packaging/issues/new/choose
about: "Create issue for things related to Portmaster's installers, packaging and distribution"
- name: "Wiki and FAQ"
url: https://wiki.safing.io/
about: Learn more about Portmaster in our Wiki

- name: "Contribution Guideline"
url: https://docs.safing.io/portmaster/guides/contribute
about: Learn how to best contribute and make sure your work is aligned with Safing’s current goals and focus

- name: "Support Requests & Community"
url: https://www.reddit.com/r/safing
about: Ask for support and any questions you might have on reddit

- name: "Code of Conduct"
url: https://docs.safing.io/community/code-of-conduct
about: Be nice to other community members
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 changes: 61 additions & 0 deletions .github/workflows/angular.yml
Original file line number Diff line number Diff line change
@@ -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
36 changes: 19 additions & 17 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@ name: Go

on:
push:
paths:
- '**.go'
branches:
- master
- develop

pull_request:
branches:
- master
Expand All @@ -16,20 +19,18 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: '^1.21'

- name: Get dependencies
run: go mod download
cache: false

- name: Run golangci-lint
uses: golangci/golangci-lint-action@v3
uses: golangci/golangci-lint-action@v4
with:
version: v1.52.2
version: v1.57.1
only-new-issues: true
args: -c ./.golangci.yml --timeout 15m

Expand All @@ -40,16 +41,17 @@ jobs:
name: Test
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3

- name: Setup Go
uses: actions/setup-go@v4
- uses: earthly/actions-setup@v1
with:
go-version: '^1.21'
version: v0.8.0
- uses: actions/checkout@v4

- name: Get dependencies
run: go mod download
- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Run tests
run: ./test --test-only
- name: Build angular projects
run: earthly --ci --remote-cache=ghcr.io/safing/build-cache --push +test-go --TESTFLAGS="-short"
38 changes: 38 additions & 0 deletions .github/workflows/tauri.yml
Original file line number Diff line number Diff line change
@@ -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
10 changes: 2 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
# Compiled binaries
portmaster
portmaster.exe
dnsonly
dnsonly.exe
main
main.exe
integrationtest
integrationtest.exe
*.exe
dist/

# Dist dir
dist
Expand Down
3 changes: 3 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ linters:
- whitespace
- wrapcheck
- wsl
- perfsprint # TODO(ppacher): we should re-enanble this one to avoid costly fmt.* calls in the hot-path
- testifylint
- gomoddirectives

linters-settings:
revive:
Expand Down
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
Loading

0 comments on commit 6090518

Please sign in to comment.