Skip to content

Commit fda96de

Browse files
Merge main into release
2 parents 6a75d13 + 99f5c07 commit fda96de

File tree

259 files changed

+41181
-19722
lines changed

Some content is hidden

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

259 files changed

+41181
-19722
lines changed

.editorconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[*]
2+
charset = utf-8
3+
insert_final_newline = true
4+
end_of_line = lf
5+
indent_style = space
6+
indent_size = 2
7+
tab_width = 2
8+
max_line_length = 140
9+
trim_trailing_whitespace = true

.env.template

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
PUYA_PATH="<ABSOLUTE_PATH_TO_PUYA>" # e.g. '/home/parallels/.local/bin/puya'

.gitattributes

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Set the repository to show as TypeScript rather than JS in GitHub
2+
*.js linguist-detectable=false
3+
4+
# Treat text as lf
5+
* text=auto
6+
* eol=lf
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
name: "\U0001F41C Bug report"
3+
about: Report a reproducible bug.
4+
title: ''
5+
labels: new-bug
6+
assignees: ''
7+
---
8+
9+
### Subject of the issue
10+
11+
<!-- Describe your issue here. -->
12+
13+
### Your environment
14+
15+
<!--
16+
* Please provide information about your environment.
17+
* This will give us a good idea about your environment
18+
-->
19+
20+
### Steps to reproduce
21+
22+
1.
23+
2.
24+
25+
### Expected behaviour
26+
27+
### Actual behaviour
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
name: "\U0001F514 Feature Request"
3+
about: Suggestions for how we can improve the algorand platform.
4+
title: ''
5+
labels: new-feature-request
6+
assignees: ''
7+
---
8+
9+
## Problem
10+
11+
<!-- What is the problem that we’re trying to solve? -->
12+
13+
## Solution
14+
15+
<!-- Do you have a potential/suggested solution? Document more than one if possible. -->
16+
17+
### Proposal
18+
19+
<!-- Describe the solution you’d like in detail. -->
20+
21+
### Pros and Cons
22+
23+
<!-- What are the advantages and disadvantages of this solution? -->
24+
25+
## Dependencies
26+
27+
<!-- Does the solution have any team or design dependencies? -->

.github/workflows/gh-pages.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: 'Run typedoc and publish to pages'
2+
3+
on:
4+
workflow_call:
5+
workflow_dispatch:
6+
7+
jobs:
8+
build-and-publish-docs:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
contents: read
12+
pages: write
13+
id-token: write
14+
steps:
15+
- name: Checkout source code
16+
uses: actions/checkout@v4
17+
18+
- name: Use Node.js 22.x
19+
uses: actions/setup-node@v4
20+
with:
21+
node-version: 22.x
22+
23+
- name: Npm install
24+
run: npm ci --ignore-scripts
25+
26+
- name: Build doc
27+
run: npm run script:documentation
28+
29+
- name: Upload to GitHub pages
30+
uses: actions/upload-pages-artifact@v3
31+
with:
32+
path: docs/_html
33+
34+
- name: Deploy to GitHub Pages
35+
uses: actions/deploy-pages@v4

.github/workflows/node-ci.yml

Lines changed: 179 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,179 @@
1+
on:
2+
workflow_call:
3+
inputs:
4+
node-version:
5+
required: false
6+
type: string
7+
default: 18.x
8+
working-directory:
9+
required: false
10+
type: string
11+
default: '.'
12+
lint-script:
13+
required: false
14+
type: string
15+
default: npm run lint --if-present
16+
compile-script:
17+
required: false
18+
type: string
19+
default: npm run check-types --if-present
20+
pre-test-script:
21+
required: false
22+
type: string
23+
test-script:
24+
required: false
25+
type: string
26+
default: npm run test --if-present
27+
test-environment-variables:
28+
required: false
29+
type: string
30+
default: '{}'
31+
output-test-results:
32+
required: false
33+
type: boolean
34+
default: false
35+
test-results-file-pattern:
36+
required: false
37+
type: string
38+
default: '**/test-results.xml'
39+
audit-script:
40+
required: false
41+
type: string
42+
default: npm audit
43+
build-script:
44+
required: false
45+
type: string
46+
default: npm run build
47+
run-build:
48+
required: false
49+
type: boolean
50+
default: false
51+
run-commit-lint:
52+
required: false
53+
type: boolean
54+
default: false
55+
commit-lint-script:
56+
required: false
57+
type: string
58+
default: npx commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose
59+
pre-run-script:
60+
required: false
61+
type: string
62+
upload-artifact-name:
63+
required: false
64+
type: string
65+
upload-artifact-path:
66+
required: false
67+
description: The full path to the artifact directory, this path does not take working-directory into account
68+
type: string
69+
default: .
70+
71+
download-artifact-name:
72+
required: false
73+
type: string
74+
download-artifact-pattern:
75+
required: false
76+
type: string
77+
download-artifact-path:
78+
required: false
79+
description: The full path to the artifact directory, this path does not take working-directory into account
80+
type: string
81+
default: .
82+
83+
secrets:
84+
npm-auth-token:
85+
description: NPM auth token (don't pass in on a PR build on a public repository)
86+
required: false
87+
88+
jobs:
89+
node-ci:
90+
runs-on: ubuntu-latest
91+
92+
defaults:
93+
run:
94+
shell: bash
95+
working-directory: ${{ inputs.working-directory }}
96+
97+
steps:
98+
- name: Checkout
99+
uses: actions/checkout@v4
100+
with:
101+
fetch-depth: 0
102+
103+
# setup node + private repo access
104+
- name: Use Node.js ${{ inputs.node-version }}
105+
uses: actions/setup-node@v4
106+
with:
107+
node-version: ${{ inputs.node-version }}
108+
registry-url: 'https://npm.pkg.github.com'
109+
scope: '@makerxstudio'
110+
cache: 'npm'
111+
cache-dependency-path: ${{ inputs.working-directory }}/package-lock.json
112+
113+
- name: Download artifacts
114+
if: ${{ inputs.download-artifact-name || inputs.download-artifact-pattern }}
115+
uses: actions/download-artifact@v4
116+
with:
117+
name: ${{ inputs.download-artifact-name }}
118+
pattern: ${{ inputs.download-artifact-pattern }}
119+
path: ${{ inputs.download-artifact-path }}
120+
121+
- name: Pre-run
122+
if: ${{ inputs.pre-run-script }}
123+
run: ${{ inputs.pre-run-script }}
124+
125+
# run npm ci preventing script access to npm auth token
126+
- run: npm ci --ignore-scripts
127+
env:
128+
NODE_AUTH_TOKEN: ${{ secrets.npm-auth-token || secrets.GITHUB_TOKEN }}
129+
# allow scripts to run without npm auth token
130+
- run: npm rebuild && npm run prepare --if-present
131+
132+
# run all the CI scripts
133+
- name: 'Commit lint'
134+
if: ${{ inputs.run-commit-lint }}
135+
run: ${{ inputs.commit-lint-script }}
136+
137+
- name: Lint
138+
run: ${{ inputs.lint-script }}
139+
140+
- name: Compile
141+
run: ${{ inputs.compile-script }}
142+
143+
- name: Pre-test
144+
if: ${{ inputs.pre-test-script }}
145+
run: ${{ inputs.pre-test-script }}
146+
147+
- name: Test
148+
run: ${{ inputs.test-script }}
149+
env: ${{ fromJson(inputs.test-environment-variables) }}
150+
151+
#Requires permissions.checks: write
152+
- name: Publish test results
153+
if: ${{ inputs.output-test-results }}
154+
uses: phoenix-actions/test-reporting@v10
155+
with:
156+
name: Test results
157+
path: ${{ inputs.test-results-file-pattern }}
158+
reporter: jest-junit
159+
output-to: checks
160+
fail-on-error: false
161+
162+
- name: Audit
163+
run: ${{ inputs.audit-script }}
164+
165+
- name: Build
166+
if: ${{ inputs.run-build }}
167+
run: ${{ inputs.build-script }}
168+
# CDK infrastructure build calls npm ci on /infrastructure/build, which may fail without NODE_AUTH_TOKEN
169+
env:
170+
NODE_AUTH_TOKEN: ${{ secrets.npm-auth-token || secrets.GITHUB_TOKEN }}
171+
172+
- name: Publish artifact
173+
if: ${{ inputs.upload-artifact-name }}
174+
uses: actions/upload-artifact@v4
175+
with:
176+
name: ${{ inputs.upload-artifact-name }}
177+
path: ${{ inputs.upload-artifact-path }}
178+
179+

.github/workflows/pr.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Pull Request
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
- alpha
8+
paths-ignore:
9+
- 'docs/**'
10+
- 'scripts/**'
11+
12+
permissions:
13+
contents: read
14+
15+
jobs:
16+
build:
17+
name: 'Build @algorandfoundation/algorand-typescript-testing'
18+
uses: ./.github/workflows/node-ci.yml
19+
with:
20+
pre-test-script: |
21+
pipx install algokit --python 3.12.6
22+
algokit localnet reset --update
23+
pipx install puyapy --python 3.12.6
24+
node-version: 22.x
25+
run-build: true
26+
run-commit-lint: true
27+
audit-script: npm run audit

.github/workflows/prod-release.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Prod Publish
2+
3+
on:
4+
workflow_dispatch:
5+
6+
permissions:
7+
contents: write
8+
9+
jobs:
10+
prod_release:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Generate bot token
14+
uses: actions/create-github-app-token@v1
15+
id: app_token
16+
with:
17+
app-id: ${{ secrets.BOT_ID }}
18+
private-key: ${{ secrets.BOT_SK }}
19+
20+
- uses: actions/checkout@v4
21+
with:
22+
# Fetch entire repository history so we can determine version number from it
23+
fetch-depth: 0
24+
token: ${{ steps.app_token.outputs.token }}
25+
26+
- name: Set Git user as GitHub actions
27+
run: git config --global user.email "179917785+engineering-ci[bot]@users.noreply.github.com" && git config --global user.name "engineering-ci[bot]"
28+
29+
- name: Merge main -> release
30+
uses: devmasx/merge-branch@854d3ac71ed1e9deb668e0074781b81fdd6e771f
31+
with:
32+
type: now
33+
from_branch: main
34+
target_branch: release
35+
github_token: ${{ steps.app_token.outputs.token }}
36+
37+
- name: Merge release -> main
38+
uses: devmasx/merge-branch@854d3ac71ed1e9deb668e0074781b81fdd6e771f
39+
with:
40+
type: now
41+
from_branch: release
42+
target_branch: main
43+
github_token: ${{ steps.app_token.outputs.token }}
44+
env:
45+
INPUT_MESSAGE: 'Merge release back to main to get version increment [no ci]'

0 commit comments

Comments
 (0)