Skip to content
This repository was archived by the owner on Nov 5, 2024. It is now read-only.

Commit a65ff32

Browse files
authored
Update library to support latest dependencies (#207)
* Bump packages. Update test script. Bump version * Relocate test Cadence code * Relocate test code * Update default compute limit to higher value * Update GitHub workflows * Add signature check skip. Refactor code for readability * Update flow.json files * Increase timeout due to occasional failing transactions * Remove unnecessary logging call * Catch lost logs via pause * Move transformers test * Add logs from transaction, update regexp to catch logs * Add changeset * Update pull-request workflow * Update test script to include coverage file * Update actions to use latest Node * Update .npmignore * Update checkout script. Use specific node version. * Add report via sticky comment * Add ignore patterns for code coverage * Update coverage patterns * Output flow version as comment * Add pipe character into flow version output * Update flow version message * Update testbed scripts and message * Update testbed message * Fix version template * Adjust testbed message * Set package version * Update changeset * Remove flow-cadut dependency * Remove flow-cadut from workflow * Add headers to utils * Update CLI commands and templates * Revert name and version changes
1 parent 00d7c66 commit a65ff32

Some content is hidden

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

44 files changed

+1022
-1125
lines changed

.changeset/blue-dancers-guess.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
"@onflow/flow-js-testing": patch
3+
---
4+
5+
- Tests updated and double-checked.
6+
- Fixed regexp for log extracting.
7+
- Added ability to skip transaction signatures validation.
8+
- Updated GitHub actions to show code coverage report

.github/workflows/ci.yml

Lines changed: 0 additions & 43 deletions
This file was deleted.

.github/workflows/pull-request.yml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
name: Pull Request
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
8+
jobs:
9+
test:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v3
13+
14+
- name: Setup Node.js
15+
uses: actions/setup-node@v3
16+
with:
17+
node-version: 16
18+
19+
- name: Cache Node.js Modules
20+
uses: actions/cache@v3
21+
with:
22+
path: ~/.npm
23+
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }}
24+
restore-keys: |
25+
${{ runner.OS }}-node-
26+
${{ runner.OS }}-
27+
28+
- name: Check License Headers
29+
run: ./check-headers.sh
30+
31+
- name: Install Flow CLI
32+
run: sh -ci "$(curl -fsSL https://raw.githubusercontent.com/onflow/flow-cli/master/install.sh)"
33+
34+
- name: Get Flow CLI version
35+
id: testbed
36+
run: |
37+
echo "flow-version=$(echo | flow version | grep 'Version' | sed 's/[^0-9\.]*//g')" >> $GITHUB_OUTPUT
38+
echo "package-version=$(grep version package.json | sed 's/.*"version": "\(.*\)".*/\1/')" >> $GITHUB_OUTPUT
39+
echo "fcl-version=$(grep 'fcl":' package.json | sed 's/.*"@onflow\/fcl": "\(.*\)".*/\1/')" >> $GITHUB_OUTPUT
40+
41+
- name: Output Flow Version
42+
uses: marocchino/sticky-pull-request-comment@v2
43+
with:
44+
# pass output from the previous step by id.
45+
header: Flow Version
46+
message: |
47+
### Dependency Testbed
48+
- **Flow CLI**: `${{ steps.testbed.outputs.flow-version }}`
49+
- **FCL**: `${{ steps.testbed.outputs.fcl-version }}`
50+
51+
### Release Version
52+
The package containing these changes will be released with version **${{ steps.testbed.outputs.package-version }}**
53+
54+
- name: Install Dependencies
55+
run: npm ci
56+
57+
- name: Lint
58+
run: npm run lint
59+
60+
- name: Find PR Number
61+
uses: jwalton/gh-find-current-pr@v1
62+
id: currentPr
63+
64+
- name: Test Coverage
65+
uses: ArtiomTr/[email protected]
66+
id: coverage
67+
with:
68+
skip-step: install
69+
prnumber: ${{ steps.currentPr.outputs.number }}
70+
output: report-markdown
71+
72+
- name: Output As Comment
73+
uses: marocchino/sticky-pull-request-comment@v2
74+
with:
75+
header: Coverage Report
76+
message: ${{ steps.coverage.outputs.report }}
77+
78+

.github/workflows/release.yml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,18 @@ jobs:
99
runs-on: ubuntu-latest
1010
steps:
1111
- name: Checkout Repo
12-
uses: actions/checkout@v2
12+
uses: actions/checkout@v3
1313
with:
1414
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
1515
fetch-depth: 0
1616

17-
# gallium is the v16 lts
18-
- name: Setup Node.js lts/gallium
19-
uses: actions/setup-node@v2
17+
- name: Setup Node.js
18+
uses: actions/setup-node@v3
2019
with:
21-
node-version: lts/gallium
22-
23-
- name: Install Flow CLI
24-
run: /home/linuxbrew/.linuxbrew/bin/brew install flow-cli
20+
node-version: 16
2521

2622
- name: Install Dependencies
27-
run: npm i
23+
run: npm ci
2824

2925
- name: Create Release Pull Request or Publish to npm
3026
id: changesets

.npmignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.changeset
2+
.github
3+
node_modules

dev-test/flow.json

Lines changed: 0 additions & 21 deletions
This file was deleted.

flow.json

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,14 @@
11
{
2-
"emulators": {
3-
"default": {
4-
"port": 3569,
5-
"serviceAccount": "emulator-account"
6-
}
7-
},
8-
"contracts": {},
92
"networks": {
103
"emulator": "127.0.0.1:3569",
114
"mainnet": "access.mainnet.nodes.onflow.org:9000",
5+
"sandboxnet": "access.sandboxnet.nodes.onflow.org:9000",
126
"testnet": "access.devnet.nodes.onflow.org:9000"
137
},
148
"accounts": {
159
"emulator-account": {
1610
"address": "f8d6e0586b0a20c7",
17-
"key": "f9cd76bf71c3371c76743ff22a0a1ee6657c63c46c62bd86a20266471fe0ea70"
11+
"key": "992e51111af4107f1521afffa297788e4b7f83a2012811d6d1ba73d6296216de"
1812
}
19-
},
20-
"deployments": {}
21-
}
13+
}
14+
}

0 commit comments

Comments
 (0)