Skip to content

Commit 2148160

Browse files
chore: release v0.2.0
1 parent a610336 commit 2148160

File tree

990 files changed

+196962
-18294
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

990 files changed

+196962
-18294
lines changed

.dockerignore

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
docker-compose.yaml
2+
.dockerignore
3+
**/Dockerfile
4+
**/node_modules
5+
**/__test__
6+
**/coverage
7+
**/build
8+
**/tsconfig.tsbuildinfo
9+
.git
10+
.gitignore
11+
jest.*
12+
*.md
13+
LICENSE
14+
database.sqlite
15+
appspec.yml
16+
.prettierrc
17+
.prettierignore
18+
.eslintrc.json
19+
.eslintignore
20+
.editorconfig
21+
.vscode
22+
logs
23+
aws
24+
.DS_Store
25+
e2e/package.json
26+
e2e/yarn.lock
27+
28+
packages/mock-app/src/constants/app-config.json
29+
packages/components/src/constants/app-config.json

.eslintignore

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
11
build
22
lib
3-
coverage
3+
coverage
4+
__tests__
5+
scripts
6+
jest.config.*
7+
jest.*.config.*
8+
integration
9+
node_modules
10+
.next
11+
packages/untp-playground/infra
12+

.eslintrc.json

Lines changed: 39 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,53 @@
11
{
22
"root": true,
3-
"plugins": ["@typescript-eslint", "prettier"],
3+
// TODO: Enable linting for documentation folder
4+
"ignorePatterns": [
5+
"documentation",
6+
"e2e"
7+
],
8+
"plugins": [
9+
"@typescript-eslint",
10+
"prettier"
11+
],
412
"parser": "@typescript-eslint/parser",
513
"extends": [
614
"eslint:recommended",
715
"plugin:@typescript-eslint/recommended",
816
"plugin:@typescript-eslint/recommended-requiring-type-checking"
917
],
1018
"parserOptions": {
11-
"project": ["tsconfig.base.json"]
19+
"project": [
20+
"./packages/*/tsconfig.json"
21+
]
1222
},
1323
"rules": {
1424
"no-console": "warn",
25+
"prefer-rest-params": "warn",
26+
"@typescript-eslint/ban-ts-comment": "warn",
27+
// Off for now, but we should enable this in the future
1528
"@typescript-eslint/no-unsafe-call": "off",
1629
"@typescript-eslint/no-unsafe-member-access": "off",
17-
"@typescript-eslint/no-unsafe-assignment": "off"
18-
}
19-
}
30+
"@typescript-eslint/no-unsafe-assignment": "off",
31+
"@typescript-eslint/no-var-requires": "off",
32+
"@typescript-eslint/no-explicit-any": "off",
33+
"@typescript-eslint/no-unsafe-return": "off",
34+
"@typescript-eslint/no-unsafe-argument": "off",
35+
"@typescript-eslint/no-non-null-assertion": "off",
36+
"@typescript-eslint/no-floating-promises": "off",
37+
"@typescript-eslint/restrict-template-expressions": "off",
38+
"@typescript-eslint/no-misused-promises": "off",
39+
"@typescript-eslint/require-await": "off",
40+
"@typescript-eslint/no-unused-vars": "off",
41+
"prefer-const": "off"
42+
},
43+
"overrides": [
44+
{
45+
"files": [
46+
"*.js"
47+
],
48+
"rules": {
49+
"@typescript-eslint/no-var-requires": "off"
50+
}
51+
}
52+
]
53+
}

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ https://docs.github.com/en/free-pro-team@latest/github/managing-your-work-on-git
5252

5353
## Added to documentation?
5454

55+
- [ ] 📖 [Mock App docs site](https://uncefact.github.io/tests-untp/docs/mock-apps/)
5556
- [ ] 📜 README.md
5657
- [ ] 📕 storybook
5758
- [ ] 🙅 no documentation needed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
".": "0.2.0"
3+
}

.github/workflows/build_test.yml

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
name: Build and Test
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- next
7+
8+
jobs:
9+
test_and_build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout repository
13+
uses: actions/checkout@v3
14+
with:
15+
fetch-depth: 0
16+
ref: ${{ github.event.pull_request.head.sha }}
17+
18+
- name: Enable Corepack
19+
run: corepack enable
20+
21+
- name: Install Node.js
22+
uses: actions/setup-node@v3
23+
with:
24+
node-version: '22'
25+
cache: 'yarn'
26+
27+
- name: Install dependencies
28+
run: |
29+
yarn cache clean && yarn install --immutable
30+
31+
- name: Check linting
32+
run: yarn lint
33+
34+
- name: Build
35+
run: yarn build
36+
37+
- name: Run tests
38+
run: |
39+
yarn test:coverage
40+
41+
- name: Jest Coverage Comment
42+
uses: MishaKav/jest-coverage-comment@main
43+
with:
44+
title: Code Coverage Report
45+
multiple-files: |
46+
All packages, ./coverage/coverage-summary.json
47+
Components, ./packages/components/coverage/coverage-summary.json
48+
Mock app, ./packages/mock-app/coverage/coverage-summary.json
49+
Services, ./packages/services/coverage/coverage-summary.json
50+
UNTP test suite, ./packages/untp-test-suite/coverage/coverage-summary.json
51+
VC test suite, ./packages/vc-test-suite/coverage/coverage-summary.json
52+
UNTP Playground, ./packages/untp-playground/coverage/coverage-summary.json
53+
54+
#https://github.com/actions/runner-images/issues/2840#issuecomment-1284059930
55+
- name: Free up space on ubuntu runner for E2E tests
56+
run: |
57+
sudo rm -rf /usr/share/dotnet
58+
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
59+
60+
- name: Start E2E docker compose
61+
run: SEEDING=true docker compose -f docker-compose.e2e.yml up -d
62+
63+
- name: Run E2E tests
64+
run: yarn test:run-cypress
65+
env:
66+
NODE_OPTIONS: "--no-experimental-require-module --no-experimental-detect-module" # See issue https://github.com/cypress-io/github-action/issues/1408
67+
68+
- name: Stop docker compose
69+
run: docker compose -f docker-compose.e2e.yml down
70+
71+
build_docs:
72+
runs-on: ubuntu-latest
73+
steps:
74+
- name: Checkout repository
75+
uses: actions/checkout@v4
76+
77+
- name: Setup Node.js
78+
uses: actions/setup-node@v3
79+
with:
80+
node-version: 20
81+
cache: yarn
82+
83+
- name: Install and build documentation
84+
run: |
85+
cd documentation
86+
yarn install --frozen-lockfile
87+
yarn build
88+
env:
89+
DOCS_BASE_URL: ${{ vars.DOCS_BASE_URL }}
90+
DOCS_URL: ${{ vars.DOCS_URL }}
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- next
7+
- main
8+
9+
jobs:
10+
deploy:
11+
name: Deploy to GitHub Pages
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
- uses: actions/setup-node@v3
16+
with:
17+
node-version: 20
18+
cache: yarn
19+
20+
- name: Install dependencies
21+
run: cd documentation && yarn install --frozen-lockfile
22+
23+
- name: Build website
24+
run: cd documentation && yarn build
25+
env:
26+
DOCS_BASE_URL: ${{ vars.DOCS_BASE_URL }}
27+
DOCS_URL: ${{ vars.DOCS_URL }}
28+
DOCS_SITE_TITLE: ${{ vars.DOCS_SITE_TITLE }}
29+
DOCS_SITE_TAGLINE: ${{ vars.DOCS_SITE_TAGLINE }}
30+
DOCS_SITE_LOGO_URL: ${{ vars.DOCS_SITE_LOGO_URL }}
31+
DOCS_SITE_LOGO_ALT: ${{ vars.DOCS_SITE_LOGO_ALT }}
32+
DOCS_ORGANIZATION_NAME: ${{ vars.DOCS_ORGANIZATION_NAME }}
33+
DOCS_PROJECT_NAME: ${{ vars.DOCS_PROJECT_NAME }}
34+
DOCS_FAVICON_URL: ${{ vars.DOCS_FAVICON_URL }}
35+
DOCS_NAVBAR_TITLE: ${{ vars.DOCS_NAVBAR_TITLE }}
36+
DOCS_HERO_IMAGE_URL: ${{ vars.DOCS_HERO_IMAGE_URL }}
37+
DOCS_HERO_IMAGE_ALT: ${{ vars.DOCS_HERO_IMAGE_ALT }}
38+
DOCS_EDIT_URL_BASE: ${{ vars.DOCS_EDIT_URL_BASE }}
39+
DOCS_REPOSITORY_LINK: ${{ vars.DOCS_REPOSITORY_LINK }}
40+
DOCS_SLACK_COMMUNITY_LINK: ${{ vars.DOCS_SLACK_COMMUNITY_LINK }}
41+
DOCS_SOCIAL_MEDIA_PREVIEW_IMAGE_URL: ${{ vars.DOCS_SOCIAL_MEDIA_PREVIEW_IMAGE_URL }}
42+
DOCS_EXTENSIONS_LINK: ${{ vars.DOCS_EXTENSIONS_LINK }}
43+
DOCS_FOOTER_TITLE: ${{ vars.DOCS_FOOTER_TITLE }}
44+
DOCS_FOOTER_SPEC_TITLE: ${{ vars.DOCS_FOOTER_SPEC_TITLE }}
45+
DOCS_FOOTER_SPEC_LINK: ${{ vars.DOCS_FOOTER_SPEC_LINK }}
46+
DOCS_COPYRIGHT_TEXT: ${{ vars.DOCS_COPYRIGHT_TEXT }}
47+
48+
# Popular action to deploy to GitHub Pages:
49+
# Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus
50+
- name: Deploy to GitHub Pages
51+
uses: peaceiris/actions-gh-pages@v3
52+
with:
53+
github_token: ${{ secrets.GITHUB_TOKEN }}
54+
# Build output to publish to the `gh-pages` branch:
55+
publish_dir: ./documentation/build
56+
# The following lines assign commit authorship to the official
57+
# GH-Actions bot for deploys to `gh-pages` branch:
58+
# https://github.com/actions/checkout/issues/13#issuecomment-724415212
59+
# The GH actions bot is used by default if you didn't specify the two fields.
60+
# You can swap them out with your own user credentials.
Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
name: 'CI/CD UNTP Playgroud'
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- next
8+
- 'cd/**'
9+
paths:
10+
- 'packages/untp-playground/**'
11+
- '.github/workflows/ci_cd-untp-playground.yml'
12+
13+
jobs:
14+
#todo: add running tests job
15+
deploy_test:
16+
if: github.repository_owner == 'uncefact' && ( github.ref == 'refs/heads/next' || startsWith(github.ref, 'refs/heads/cd/') )
17+
concurrency:
18+
group: untp-plaground-${{github.ref}}
19+
20+
permissions:
21+
id-token: write
22+
contents: read
23+
24+
name: Deploy to Test
25+
environment:
26+
name: test
27+
url: https://test.uncefact.org/test-untp-playground
28+
29+
runs-on: ubuntu-latest
30+
steps:
31+
- uses: actions/checkout@v4
32+
33+
- name: aws_login_uncefact
34+
uses: aws-actions/configure-aws-credentials@v4
35+
with:
36+
role-to-assume: ${{env.AWS_ROLE_TO_ASSUME}}
37+
aws-region: us-east-1
38+
env:
39+
AWS_ROLE_TO_ASSUME: ${{ secrets.UNCEFACT_AWS_ROLE_TO_ASSUME}}
40+
41+
42+
- name: Setup Node LTS ✨
43+
uses: actions/setup-node@v3
44+
with:
45+
node-version: lts/*
46+
cache: yarn
47+
48+
- name: Installing dependencies 📦️
49+
run: yarn install
50+
working-directory: ./packages/untp-playground/infra
51+
52+
- name: Deploy Stack
53+
uses: pulumi/actions@v5
54+
with:
55+
command: up
56+
stack-name: ${{ env.STACK_NAME}}
57+
work-dir: ./packages/untp-playground/infra
58+
env:
59+
NEXT_PUBLIC_BASE_PATH: /test-untp-playground
60+
NEXT_PUBLIC_ASSET_PREFIX: /test-untp-playground
61+
NEXT_PUBLIC_IMAGE_PATH: /test-untp-playground/_next/image
62+
NEXT_PUBLIC_REPORT_NAME:
63+
STACK_NAME: test
64+
65+
deploy_prod:
66+
if: github.repository_owner == 'uncefact' && github.ref_type == 'tag' && github.event_name == 'workflow_dispatch'
67+
concurrency:
68+
group: untp-plaground-${{github.ref}}
69+
70+
permissions:
71+
id-token: write
72+
contents: read
73+
74+
name: Deploy to Prod
75+
environment:
76+
name: production
77+
url: https://test.uncefact.org/untp-playground
78+
79+
runs-on: ubuntu-latest
80+
steps:
81+
- uses: actions/checkout@v4
82+
83+
- name: aws_login_uncefact
84+
uses: aws-actions/configure-aws-credentials@v4
85+
with:
86+
role-to-assume: ${{env.AWS_ROLE_TO_ASSUME}}
87+
aws-region: us-east-1
88+
env:
89+
AWS_ROLE_TO_ASSUME: ${{ secrets.UNCEFACT_AWS_ROLE_TO_ASSUME}}
90+
91+
92+
- name: Setup Node LTS ✨
93+
uses: actions/setup-node@v3
94+
with:
95+
node-version: lts/*
96+
cache: yarn
97+
98+
- name: Installing dependencies 📦️
99+
run: yarn install
100+
working-directory: ./packages/untp-playground/infra
101+
102+
- name: Deploy Stack
103+
uses: pulumi/actions@v5
104+
with:
105+
command: up
106+
stack-name: ${{ env.STACK_NAME}}
107+
work-dir: ./packages/untp-playground/infra
108+
env:
109+
NEXT_PUBLIC_BASE_PATH: /untp-playground
110+
NEXT_PUBLIC_ASSET_PREFIX: /untp-playground
111+
NEXT_PUBLIC_IMAGE_PATH: /untp-playground/_next/image
112+
NEXT_PUBLIC_REPORT_NAME:
113+
STACK_NAME: prod

0 commit comments

Comments
 (0)