Skip to content

Commit

Permalink
Merge branch 'main' into fix/p2e-eth
Browse files Browse the repository at this point in the history
  • Loading branch information
n0izn0iz authored Aug 27, 2024
2 parents f041ceb + 74a8445 commit 0acf996
Show file tree
Hide file tree
Showing 209 changed files with 10,977 additions and 536 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/buf-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ jobs:
check-codegen:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: bufbuild/buf-setup-action@v1.28.0
- uses: bufbuild/buf-setup-action@v1.31.0
with:
version: 1.28.0
version: 1.31.0
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: Buf lint
Expand Down
17 changes: 10 additions & 7 deletions .github/workflows/desktop-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@ jobs:
- name: Cancel Previous Runs
uses: styfle/[email protected]

- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
cache: "yarn"
node-version-file: ".nvmrc"

- uses: actions/setup-go@v3
with:
go-version: "1.19"
go-version: "1.20"

- name: Install node modules
run: yarn
Expand Down Expand Up @@ -54,16 +54,19 @@ jobs:
runs-on: ${{ matrix.runner }}
continue-on-error: true
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
cache: "npm"
cache: "yarn"
node-version-file: ".nvmrc"

- uses: actions/setup-go@v3
with:
go-version: "1.19"
go-version: "1.20"

- name: Install node modules
run: yarn

- name: Download web build
uses: actions/download-artifact@v3
Expand Down
37 changes: 37 additions & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: E2E Tests

on:
push:
branches:
- main
pull_request:
merge_group:

jobs:
e2e-tests:
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
cache: "yarn"
node-version-file: ".nvmrc"
- uses: actions/setup-go@v3
with:
go-version: "1.22"
- uses: cypress-io/github-action@v6
with:
browser: chrome
build: make install-gno
start: |
yarn start --minify
make start.gnodev-e2e
wait-on: "http://localhost:8888, http://localhost:8081"
- name: Upload errors screenshots
uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-screenshots
path: cypress/screenshots
10 changes: 5 additions & 5 deletions .github/workflows/gen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,22 @@ jobs:
check-codegen:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
cache: "yarn"
node-version-file: ".nvmrc"

- uses: actions/setup-go@v3
with:
go-version: "1.19"
go-version: "1.22"

- uses: dtolnay/rust-toolchain@stable

- uses: bufbuild/buf-setup-action@v1.28.0
- uses: bufbuild/buf-setup-action@v1.31.0
with:
version: 1.28.0
version: 1.31.0
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: Install node modules
Expand Down
15 changes: 14 additions & 1 deletion .github/workflows/gno-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
go-version: "1.22"
- name: Clean gno
run: make clean-gno

- name: Clone gno
run: make clone-gno

Expand All @@ -27,3 +27,16 @@ jobs:

- name: Lint gno
run: make lint-gno

- name: gno mod tidy
run: make gno-mod-tidy

- name: Check that there is no diff
run: |
mrdiff=$(git status --porcelain)
if [[ $mrdiff ]]; then
echo 'ERROR: Diff found!'
echo $mrdiff
git diff
exit 1
fi
4 changes: 2 additions & 2 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ jobs:
go:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/setup-go@v3
with:
go-version: "1.19"
go-version: "1.22"

- name: Tidy go.mod
run: make go-mod-tidy
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ jobs:
lint-and-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
cache: "yarn"
node-version-file: ".nvmrc"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/mobile-build-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ jobs:
with:
go-version: "1.20"

- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
cache: "yarn"
node-version-file: ".nvmrc"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/mobile-build-ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ jobs:
- name: Select xcode
run: sudo xcode-select -s /Applications/Xcode_15.2.app

- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
cache: "yarn"
node-version-file: ".nvmrc"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
rust:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: dtolnay/rust-toolchain@stable

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -103,3 +103,4 @@ temp/

# rust
/target/
artifacts
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18.1.0
20.8.1
24 changes: 21 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -416,19 +416,37 @@ generate.internal-contracts-clients: node_modules
npx tsx packages/scripts/makeTypescriptIndex $${outdir} || exit 1 ; \
done

.PHONY: install-gno
install-gno: node_modules
yarn install-gno

.PHONY: start.gnodev-e2e
start.gnodev-e2e:
gnodev --unsafe-api --server-mode --add-account g193vp9tjhfpldvgg3gn433ayv8pn7rtfv8shyeq $$(find gno -name gno.mod -type f -exec dirname {} \;)

.PHONY: clone-gno
clone-gno:
cd gnobuild && git clone https://github.com/gnolang/gno.git
cp -r ./gno/p ./gnobuild/gno/examples/gno.land/p/demo/teritori
mkdir -p gnobuild
cd gnobuild && git clone https://github.com/gnolang/gno.git && cd gno && git checkout 9b114172063feaf2da4ae7ebb8263cada3ba699b
cp -r ./gno/p ./gnobuild/gno/examples/gno.land/p/teritori

.PHONY: build-gno
build-gno:
cd gnobuild/gno/gnovm && make build

.PHONY: lint-gno
lint-gno:
./gnobuild/gno/gnovm/build/gno lint ./gno/. -v

.PHONY: test-gno
test-gno:
./gnobuild/gno/gnovm/build/gno test ./gno/... -v

.PHONY: gno-mod-tidy
gno-mod-tidy:
export gno=$$(pwd)/gnobuild/gno/gnovm/build/gno; \
find gno -name gno.mod -type f | xargs -I'{}' sh -c 'cd $$(dirname {}); $$gno mod tidy' \;

.PHONY: clean-gno
clean-gno:
rm -rf gnobuild
mkdir gnobuild
3 changes: 3 additions & 0 deletions assets/icons/github.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions assets/icons/no-tasks.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions assets/icons/projects-completed.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions assets/icons/projects-inProgress.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions assets/icons/projects-open.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions assets/icons/projects-program.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions assets/icons/projects-review.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/project-success-payment.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions cypress.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { defineConfig } from "cypress";

export default defineConfig({
viewportWidth: 1900,
viewportHeight: 1280,
e2e: {
setupNodeEvents(on, config) {
// implement node event listeners here
},
},
});
9 changes: 9 additions & 0 deletions cypress/e2e/0_preload.cy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// this helps to get accurate test times by running first and preloading the app

describe("Preload", () => {
it("successfully loads", () => {
cy.visit("http://localhost:8081", {
timeout: 300000,
});
});
});
16 changes: 16 additions & 0 deletions cypress/e2e/lib.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
export const changeTestUser = (user: string) => {
cy.window().then(async (win) => {
const newUserId = await (win as any).adena.SetTestUser(user);
cy.get(`*[data-testid='selected-wallet-${newUserId}']`).should("exist");
});
};

export const changeSelectedMilestoneStatus = (newStatus: string) => {
const getStatusDropdown = () =>
cy.get("*[data-testid='milestone-select-new-status']", { timeout: 20000 });
getStatusDropdown().click();
const statusElem = getStatusDropdown().contains(newStatus);
statusElem.click();
statusElem.should("not.exist");
cy.contains("Change Status").click();
};
Loading

0 comments on commit 0acf996

Please sign in to comment.