-
Notifications
You must be signed in to change notification settings - Fork 0
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
HeinrichAD
authored and
HeinrichAD
committed
Mar 12, 2024
0 parents
commit efb857b
Showing
70 changed files
with
36,899 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
* | ||
!docker | ||
!public | ||
!src | ||
src/setupTests.ts | ||
**/*test.ts | ||
!package.json | ||
!package-lock.json | ||
!tsconfig.json |
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,26 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
indent_style = space | ||
indent_size = 2 | ||
trim_trailing_whitespace = true | ||
|
||
[*.py] | ||
indent_size = 4 | ||
|
||
[.vscode/*.json] | ||
indent_size = 4 | ||
|
||
[{Dockerfile,Dockerfile.*}] | ||
indent_size = 4 | ||
|
||
[*.md] | ||
indent_size = 4 | ||
max_line_length = off | ||
trim_trailing_whitespace = false | ||
|
||
[*.puml] | ||
insert_final_newline = 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* text=auto eol=lf |
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,107 @@ | ||
name: Main | ||
|
||
on: | ||
- push | ||
- pull_request | ||
|
||
jobs: | ||
tests: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 'lts/hydrogen' | ||
cache: 'npm' | ||
- name: Install dependencies | ||
run: npm ci --silent | ||
- name: Run tests | ||
run: npm test --silent -- --all --watchAll=false --coverage --passWithNoTests | ||
|
||
lint-doc: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
- name: Install node dependencies | ||
run: npm install --no-save markdownlint-cli2 | ||
- name: Start static code analysis | ||
run: npm run lint:doc --silent | ||
|
||
build-and-push-docker-image: | ||
needs: [tests, lint-doc] | ||
permissions: | ||
contents: read | ||
packages: write | ||
env: | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: ${{ github.repository }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Log in to the Container registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Extract metadata (tags, labels) for Docker | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | ||
tags: | | ||
type=ref,event=branch | ||
type=ref,event=pr | ||
type=semver,pattern={{version}} | ||
type=semver,pattern={{major}}.{{minor}} | ||
- name: Build and push Docker image | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
push: ${{ contains(github.ref, 'main') || startsWith(github.ref, 'refs/tags/v') }} | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
|
||
build-pages: | ||
needs: [tests, lint-doc] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Touch requirements.txt | ||
run: touch requirements.txt | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.10" | ||
cache: "pip" | ||
- name: Install documentation dependencies | ||
run: pip install mkdocs-material | ||
- name: Build pages | ||
run: mkdocs build | ||
- name: Fix permissions | ||
run: | | ||
chmod -c -R +rX "site/" | while read line; do | ||
echo "::warning title=Invalid file permissions automatically fixed::$line" | ||
done | ||
- name: Upload Pages artifact | ||
uses: actions/upload-pages-artifact@v2 | ||
with: | ||
path: site | ||
|
||
deploy-pages: | ||
if: contains(github.ref, 'main') | ||
needs: [build-pages] | ||
permissions: | ||
pages: write | ||
id-token: write | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v3 |
Oops, something went wrong.