Skip to content

Commit 91a9c29

Browse files
authored
Merge pull request #122 from CodeGov-org/nathan/ui-lib-extension
ci: add playwright tests, update turbo
2 parents 82f8e5e + 3e1a495 commit 91a9c29

48 files changed

Lines changed: 750 additions & 271 deletions

Some content is hidden

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

.bun-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
1.1.43

.github/actions/setup-bun/action.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,6 @@ runs:
55
using: 'composite'
66
steps:
77
- name: Setup Bun
8-
uses: oven-sh/setup-bun@v1
8+
uses: oven-sh/setup-bun@v2
9+
with:
10+
bun-version-file: '.bun-version'

.github/actions/setup-node/action.yml

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -12,29 +12,18 @@ runs:
1212
restore-keys: |
1313
${{ runner.os }}-turbo-
1414
15-
- name: Install NodeJS
16-
uses: actions/setup-node@v4
17-
with:
18-
node-version-file: '.node-version'
19-
registry-url: 'https://registry.npmjs.org'
20-
21-
- uses: pnpm/action-setup@v3
15+
- uses: pnpm/action-setup@v4
2216
name: Install pnpm
2317
id: pnpm-install
2418
with:
2519
run_install: false
2620

27-
- name: Get pnpm store directory
28-
shell: bash
29-
run: echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
30-
31-
- uses: actions/cache@v4
32-
name: Setup pnpm cache
21+
- name: Install NodeJS
22+
uses: actions/setup-node@v4
3323
with:
34-
path: ${{ env.STORE_PATH }}
35-
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
36-
restore-keys: |
37-
${{ runner.os }}-pnpm-store-
24+
node-version-file: '.node-version'
25+
registry-url: 'https://registry.npmjs.org'
26+
cache: 'pnpm'
3827

3928
- name: Install dependencies
4029
shell: bash

.github/workflows/build.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
jobs:
10+
build:
11+
name: Build
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 2
18+
19+
- name: Setup NodeJS
20+
uses: ./.github/actions/setup-node
21+
22+
- name: Setup environment files
23+
uses: ./.github/actions/setup-env-files
24+
with:
25+
storyblok-token: ${{ secrets.STAGING_STORYBLOK_TOKEN }}
26+
27+
- name: Setup DFX
28+
uses: ./.github/actions/setup-dfx
29+
30+
- name: DFX build
31+
run: dfx build --check

.github/workflows/codestyle.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Codestyle
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
jobs:
10+
rust_codestyle:
11+
name: Rust codestyle
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 2
18+
19+
- name: Cargo fmt
20+
run: cargo fmt -- --check
21+
22+
- name: Cargo clippy
23+
run: cargo clippy --all-targets --all-features
24+
25+
typescript_codestyle:
26+
name: TypeScript codestyle
27+
runs-on: ubuntu-latest
28+
steps:
29+
- name: Checkout code
30+
uses: actions/checkout@v4
31+
with:
32+
fetch-depth: 2
33+
34+
- name: Setup NodeJS
35+
uses: ./.github/actions/setup-node
36+
37+
- name: Check TypeScript formatting
38+
run: pnpm format:check
39+
40+
- name: Run ESLint
41+
run: pnpm lint

.github/workflows/integration-test.yml

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

.github/workflows/mainnet-deploy.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,21 @@ jobs:
1010
name: mainnet
1111
url: https://npiey-xiaaa-aaaal-qcx2q-cai.icp0.io
1212
steps:
13-
- name: Checkout Code
13+
- name: Checkout code
1414
uses: actions/checkout@v4
1515
with:
1616
fetch-depth: 2
1717

18-
- uses: ./.github/actions/setup-node
18+
- name: Setup NodeJS
19+
uses: ./.github/actions/setup-node
1920

20-
- uses: ./.github/actions/setup-env-files
21+
- name: Setup environment files
22+
uses: ./.github/actions/setup-env-files
2123
with:
2224
storyblok-token: ${{ secrets.PRODUCTION_STORYBLOK_TOKEN }}
2325

24-
- uses: ./.github/actions/setup-dfx
26+
- name: Setup DFX
27+
uses: ./.github/actions/setup-dfx
2528

2629
- name: Import DFX identity
2730
run: |

.github/workflows/rust-tests.yml

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

.github/workflows/tests.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
jobs:
10+
rust_tests:
11+
name: Rust tests
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 2
18+
19+
- name: Cargo test
20+
run: cargo test
21+
22+
typescript_tests:
23+
name: Typescript tests
24+
runs-on: ubuntu-latest
25+
steps:
26+
- name: Checkout code
27+
uses: actions/checkout@v4
28+
with:
29+
fetch-depth: 2
30+
31+
- name: Setup NodeJS
32+
uses: ./.github/actions/setup-node
33+
34+
- name: Install Playwright dependencies
35+
run: pnpm run playwright-install
36+
37+
- name: Setup dfx
38+
uses: ./.github/actions/setup-dfx
39+
40+
- name: Setup environment files
41+
uses: ./.github/actions/setup-env-files
42+
with:
43+
storyblok-token: ${{ secrets.STAGING_STORYBLOK_TOKEN }}
44+
45+
- name: UI library tests
46+
run: pnpm turbo test -F @cg/ui
47+
48+
- name: Angular UI library tests
49+
run: pnpm turbo test -F @cg/angular-ui
50+
51+
- name: Frontend unit tests
52+
run: pnpm turbo test -F frontend
53+
54+
backend_integration_tests:
55+
name: Backend integration tests
56+
runs-on: ubuntu-latest
57+
steps:
58+
- name: Checkout code
59+
uses: actions/checkout@v4
60+
with:
61+
fetch-depth: 2
62+
63+
- name: Setup NodeJS
64+
uses: ./.github/actions/setup-node
65+
66+
- name: Setup bun
67+
uses: ./.github/actions/setup-bun
68+
69+
- name: Setup dfx
70+
uses: ./.github/actions/setup-dfx
71+
72+
- name: DFX build
73+
run: dfx build backend --check
74+
75+
- name: Backend integration tests
76+
run: pnpm turbo test -F backend-integration

.github/workflows/typescript-tests.yml

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

0 commit comments

Comments
 (0)