-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
X
committed
Nov 25, 2023
0 parents
commit dc3ac68
Showing
41 changed files
with
11,930 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Various IDEs and Editors | ||
.vscode/ | ||
.idea/ | ||
**/*~ | ||
|
||
# Mac OSX temporary files | ||
.DS_Store | ||
**/.DS_Store | ||
|
||
# dfx temporary files | ||
.dfx/ | ||
|
||
# rust | ||
target/ | ||
release-artifacts/ | ||
|
||
# frontend code | ||
node_modules/ | ||
dist/ | ||
public | ||
|
||
# e2e tests | ||
test-results/ | ||
playwright-report/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 4 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.{yml,yaml}] | ||
indent_size = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: "Setup DFX" | ||
description: Setup DFX | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Get DFX version | ||
shell: bash | ||
run: echo "dfx_version=$(cat dfx.json | jq -r .dfx)" >> "$GITHUB_ENV" | ||
|
||
- name: Cache DFX | ||
uses: actions/cache@v3 | ||
with: | ||
path: /usr/local/bin/dfx | ||
key: dfx-cache-${{ env.dfx_version }} | ||
|
||
- name: Install DFX | ||
shell: bash | ||
run: | | ||
if command -v dfx | ||
then | ||
echo "DFX restored from cache" | ||
else | ||
echo "DFX not restored from cache, running install script:" | ||
DFX_VERSION=${{ env.dfx_version }} sh -ci "$(curl -fsSL https://sdk.dfinity.org/install.sh)" | ||
fi | ||
echo "DFX version" | ||
dfx --version | ||
- name: Configure DFX | ||
shell: bash | ||
run: | | ||
mkdir -p $HOME/.config/dfx | ||
cat <<EOF >$HOME/.config/dfx/networks.json | ||
{ | ||
"local": { | ||
"bind": "127.0.0.1:8080", | ||
"type": "ephemeral", | ||
"replica": { | ||
"subnet_type": "system" | ||
} | ||
} | ||
} | ||
EOF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: "Setup IC WASM" | ||
description: Setup IC WASM | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Get IC WASM version | ||
shell: bash | ||
run: echo "ic_wasm_version=$(cat .ic-wasm-version | xargs)" >> "$GITHUB_ENV" | ||
|
||
- name: Cache IC WASM | ||
uses: actions/cache@v3 | ||
with: | ||
path: /usr/local/bin/ic-wasm | ||
key: ic-wasm-cache-${{ env.ic_wasm_version }} | ||
|
||
- name: Install IC WASM | ||
shell: bash | ||
run: | | ||
if command -v ic-wasm | ||
then | ||
echo "IC WASM restored from cache" | ||
else | ||
echo "IC WASM not restored from cache, downloading:" | ||
curl -L https://github.com/dfinity/ic-wasm/releases/download/${{ env.ic_wasm_version }}/ic-wasm-linux64 -o /usr/local/bin/ic-wasm | ||
chmod +x /usr/local/bin/ic-wasm | ||
fi | ||
echo "IC WASM version" | ||
ic-wasm --version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
name: "Setup nodejs" | ||
description: Setup nodejs | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version-file: ".node-version" | ||
cache: "npm" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: Docker Image CI | ||
|
||
on: | ||
push: | ||
branches: ["main"] | ||
pull_request: | ||
branches: ["main"] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Build the release binary image | ||
run: make release | ||
- name: Print the git commit and the binary hash | ||
run: make hashes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Lint and Test | ||
|
||
on: | ||
push: | ||
branches: ["main"] | ||
pull_request: | ||
branches: ["main"] | ||
|
||
jobs: | ||
lint_and_test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: ./.github/actions/setup-nodejs | ||
- uses: ./.github/actions/setup-ic-wasm | ||
|
||
- name: Install NPM dependencies | ||
run: npm ci | ||
|
||
- name: Build frontend | ||
run: NODE_ENV=production npm run build --quiet | ||
|
||
- name: Build canister | ||
run: | | ||
./build.sh barebones | ||
- name: Rust lint | ||
run: cargo clippy --tests --benches -- -D clippy::all | ||
|
||
- name: Rust test | ||
run: cargo test | ||
|
||
- name: Check Rust formatting | ||
run: cargo fmt --all -- --check | ||
|
||
- name: Check Frontend formatting | ||
run: npm run format:check |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Various IDEs and Editors | ||
.vscode/* | ||
!.vscode/extensions.json | ||
.idea/ | ||
**/*~ | ||
|
||
# Mac OSX temporary files | ||
.DS_Store | ||
**/.DS_Store | ||
|
||
# dfx temporary files | ||
.dfx/ | ||
|
||
# rust | ||
target/ | ||
release-artifacts/ | ||
|
||
# frontend code | ||
node_modules/ | ||
dist/ | ||
|
||
# e2e tests | ||
test-results/ | ||
playwright-report/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
0.5.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
16.9.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/mirrors-prettier | ||
rev: "v3.0.0" | ||
hooks: | ||
- id: prettier |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Various IDEs and Editors | ||
.vscode/* | ||
!.vscode/extensions.json | ||
.idea/ | ||
**/*~ | ||
|
||
# Mac OSX temporary files | ||
.DS_Store | ||
**/.DS_Store | ||
|
||
# dfx temporary files | ||
.dfx/ | ||
|
||
# rust | ||
target/ | ||
release-artifacts/ | ||
src/backend/ | ||
src/bucket/ | ||
|
||
# frontend code | ||
node_modules/ | ||
dist/ | ||
|
||
# e2e tests | ||
test-results/ | ||
playwright-report/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"recommendations": [ | ||
"editorconfig.editorconfig", | ||
"esbenp.prettier-vscode", | ||
"rust-lang.rust-analyzer" | ||
] | ||
} |
Oops, something went wrong.