Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,6 @@ jobs:

- name: Unit tests
run: npm test -- --ci

- name: Build and run integration
run: ./scripts/integration-headless.sh
14 changes: 6 additions & 8 deletions .github/workflows/deploy-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
uses: lewagon/wait-on-check-action@v1.3.4
with:
ref: ${{ github.ref }}
check-name: 'Lint & Test'
check-name: "Lint & Test"
repo-token: ${{ secrets.GITHUB_TOKEN }}

build-prod:
Expand All @@ -46,7 +46,7 @@ jobs:
npm run postexport
env:
# Build-time envs used in next.config.js
NET: 'mainnet'
NET: "mainnet"
INFURA_API_KEY: ${{ secrets.INFURA_API_KEY }}
ALCHEMY_API_KEY: ${{ secrets.ALCHEMY_API_KEY }}
GA4_TAG_ID: ${{ secrets.GA4_TAG_ID }}
Expand Down Expand Up @@ -79,7 +79,7 @@ jobs:
- name: Select target bucket
id: bucket
run: |
echo "bucket=${S3_BUCKET_PROD}" >> $GITHUB_OUTPUT
echo "bucket=${S3_BUCKET_PROD}" >> $GITHUB_OUTPUT
env:
S3_BUCKET_PROD: ${{ secrets.S3_BUCKET_PROD }}

Expand All @@ -89,22 +89,20 @@ jobs:
--delete \
--exclude "*" \
--include "_next/*" \
--include "static/*" \
--cache-control "public, max-age=31536000, immutable"

- name: Sync HTML and other assets with no-cache
run: |
aws s3 sync $BUILD_DIR s3://${{ steps.bucket.outputs.bucket }} \
--delete \
--exclude "_next/*" \
--exclude "static/*" \
--cache-control "no-cache, no-store, must-revalidate"

- name: Invalidate CloudFront
env:
CLOUDFRONT_DISTRIBUTION_ID_PROD: ${{ secrets.CLOUDFRONT_DISTRIBUTION_ID_PROD }}
if: ${{ env.CLOUDFRONT_DISTRIBUTION_ID_PROD != '' }}
CLOUDFRONT_DISTRIBUTION_ID: ${{ secrets.CLOUDFRONT_DISTRIBUTION_ID }}
if: ${{ env.CLOUDFRONT_DISTRIBUTION_ID != '' }}
run: |
aws cloudfront create-invalidation \
--distribution-id ${{ secrets.CLOUDFRONT_DISTRIBUTION_ID_PROD }} \
--distribution-id ${{ secrets.CLOUDFRONT_DISTRIBUTION_ID }} \
--paths "/*"
19 changes: 19 additions & 0 deletions .testcaferc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"selectorTimeout": 300000,
"assertionTimeout": 300000,
"pageLoadTimeout": 30000,
"speed": 0.1,
"browsers": ["chrome:headless --disable-web-security --no-sandbox --disable-dev-shm-usage"],
"concurrency": 1,
"src": ["src/**/*.spec.js"],
"quarantineMode": {
"successThreshold": 1,
"attemptLimit": 5
},
"skipJsErrors": true,
"compilerOptions": {
"typescript": {
"configPath": "./tsconfig.json"
}
}
}
2 changes: 0 additions & 2 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@ const nextConfig = {
exportPathMap: function exportMap() {
return {
"/": { page: "/" },
"/collaborate": { page: "/collaborate" },
"/privacy": { page: "/privacy" },
"/terms": { page: "/terms" },
"/collaborators-terms": { page: "/collaborators-terms" },
"/viewer": { page: "/viewer" },
"/faq": { page: "/faq" },
};
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"serve-static": "http-server out -s -p 3000",
"integration": "testcafe chrome src/**/*.spec.js --selector-timeout 10000 --ts-config-path ./tsconfig.json",
"integration:single": "testcafe chrome -L --app \"npm run serve-static\"",
"integration:headless": "testcafe -c 1 'chrome --headless=new --disable-web-security' --selector-timeout 300000 src/**/*.spec.js",
"integration:headless": "testcafe",
"integration:watch": "nodemon --exec \"npm run integration\" --watch src",
"type-check": "npx tsc --noEmit"
},
Expand Down
32 changes: 0 additions & 32 deletions pages/collaborators-terms.tsx

This file was deleted.

119 changes: 59 additions & 60 deletions public/static/demo/amoy.opencert

Large diffs are not rendered by default.

114 changes: 58 additions & 56 deletions public/static/demo/homestead.opencert

Large diffs are not rendered by default.

Large diffs are not rendered by default.

93 changes: 0 additions & 93 deletions public/static/demo/rinkeby.opencert

This file was deleted.

93 changes: 0 additions & 93 deletions public/static/demo/ropsten.opencert

This file was deleted.

111 changes: 55 additions & 56 deletions public/static/demo/sepolia.opencert

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions public/static/registry.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"issuers": {
"0x007d40224f6562461633ccfbaffd359ebb2fc9ba": {
"name": "Government Technology Agency of Singapore (GovTech)",
"name": "ROPSTEN: OpenCerts",
"displayCard": true,
"website": "https://www.tech.gov.sg",
"email": "info@tech.gov.sg",
Expand Down Expand Up @@ -64,7 +64,7 @@
"phone": "+65 6592 1136",
"logo": "/static/images/SIT_logo.png",
"id": "sit-registry"
},
},
"0x78CE67fcb40D9D9552A313670A2e0eef11043995": {
"name": "SkillsFuture Singapore",
"displayCard": true,
Expand Down Expand Up @@ -356,11 +356,11 @@
"displayCard": false
},
"0xdcA6Eea7024151c270b50FcA9E67161119B06BAD": {
"name": "ROPSTEN: Government Technology Agency of Singapore (GovTech)",
"name": "ROPSTEN: OpenCerts",
"displayCard": false
},
"0x532C9Ff853CA54370D7492cD84040F9f8099f11B": {
"name": "ROPSTEN: Government Technology Agency of Singapore (GovTech)",
"name": "ROPSTEN: OpenCerts",
"displayCard": false
},
"0x5AA6bF8F748cD2D8f1949eD328B2bEa61CE2B6d7": {
Expand Down Expand Up @@ -400,27 +400,27 @@
"displayCard": false
},
"0x7Ee2B9a0043Bda975398477695ba5c2361acC50C": {
"name": "RINKEBY: Government Technology Agency of Singapore (GovTech)",
"name": "RINKEBY: OpenCerts",
"displayCard": false
},
"0xb3db78c0cc3622e078622C8395095a7B95415Acf": {
"name": "GOERLI: Government Technology Agency of Singapore (GovTech)",
"name": "GOERLI: OpenCerts",
"displayCard": false
},
"0x49b2969bF0E4aa822023a9eA2293b24E4518C1DD": {
"name": "GOERLI: Government Technology Agency of Singapore (GovTech)",
"name": "GOERLI: OpenCerts",
"displayCard": false
},
"0x80732bF5CA47A85e599f3ac9572F602c249C8A28": {
"name": "AMOY: Government Technology Agency of Singapore (GovTech)",
"name": "AMOY: OpenCerts",
"displayCard": false
},
"0x71D28767662cB233F887aD2Bb65d048d760bA694": {
"name": "SEPOLIA: Government Technology Agency of Singapore (GovTech)",
"name": "SEPOLIA: OpenCerts",
"displayCard": false
},
"0x80ca96D2Aab5E1E23876a4D8140Ee1292327a4cd": {
"name": "SEPOLIA: Government Technology Agency of Singapore (GovTech)",
"name": "SEPOLIA: OpenCerts",
"displayCard": false
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/components/Analytics/analytics.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ describe("analytics*", () => {
document_store: `"0x007d40224f6562461633ccfbaffd359ebb2fc9ba"`,
issued_on: "a date",
registry_id: "govtech-registry",
issuer_name: "Government Technology Agency of Singapore (GovTech)",
issuer_name: "ROPSTEN: OpenCerts",
nonInteraction: true,
value: undefined,
});
Expand Down Expand Up @@ -196,7 +196,7 @@ describe("analytics*", () => {
document_store: `"0x007d40224f6562461633ccfbaffd359ebb2fc9ba"`,
issued_on: "a date",
registry_id: "govtech-registry",
issuer_name: "Government Technology Agency of Singapore (GovTech)",
issuer_name: "ROPSTEN: OpenCerts",
nonInteraction: true,
value: undefined,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ describe("certificate verify block getV2IdentityVerificationText", () => {
{
status: "VALID",
value: "0xdcA6Eea7024151c270b50FcA9E67161119B06BAD",
name: "ROPSTEN: Government Technology Agency of Singapore (GovTech)",
name: "ROPSTEN: OpenCerts",
displayCard: false,
},
],
Expand All @@ -291,7 +291,7 @@ describe("certificate verify block getV2IdentityVerificationText", () => {
.toMatchInlineSnapshot(`
<ol>
<li>
ROPSTEN: GOVERNMENT TECHNOLOGY AGENCY OF SINGAPORE (GOVTECH)
ROPSTEN: OPENCERTS
</li>
</ol>
`);
Expand Down
Loading
Loading