Skip to content

Commit

Permalink
Merge branch 'main' into QA-441-make-allure-reports-public
Browse files Browse the repository at this point in the history
  • Loading branch information
abilevych authored Dec 15, 2023
2 parents fdab2a8 + 7251662 commit 293bac4
Show file tree
Hide file tree
Showing 230 changed files with 9,937 additions and 2,595 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/app-deploy-feature-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,14 @@ jobs:

mainnet:
needs: build
name: Feature Env, Mainnet+
name: Feature on Mainnet + Sepolia
uses: ./.github/workflows/app-e2e.yml
secrets: inherit
permissions:
contents: write
with:
targetUrl: ${{ needs.build.outputs.dappUrl }}
testnet_network_value_for_e2e: "/?network=sepolia"
default_network_value_for_e2e: "/?network=mainnet"
publish_to_allure: true
environmentTags: "and not @stagingEnv"
environmentTags: "and not @productionEnv"
3 changes: 2 additions & 1 deletion .github/workflows/app-deploy-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,14 @@ jobs:
mainnet:
needs: deploy
name: Staging Env, Mainnet+
name: Staging on Mainnet + Sepolia
uses: ./.github/workflows/app-e2e.yml
secrets: inherit
permissions:
contents: read
with:
targetUrl: ${{ needs.deploy.outputs.dappUrl }}
testnet_network_value_for_e2e: "/?network=sepolia"
default_network_value_for_e2e: "/?network=mainnet"
publish_to_allure: true
environmentTags: "and not @featureEnv"
6 changes: 5 additions & 1 deletion .github/workflows/app-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ on:
type: string
default: '/?network=mainnet'
required: true
testnet_network_value_for_e2e:
type: string
default: '/?network=sepolia'
required: true
publish_to_allure: #Here we define the variable that can be overwritten by caller workflow
type: boolean
description: "Publish test results to allure"
Expand Down Expand Up @@ -100,7 +104,7 @@ jobs:
echo "Run tests"
if [ "${{ matrix.tags }}" = "@testnetSmokeSuite" ]; then
echo "Run in testnetSmokeSuite only"
E2ENETWORK='/?network=goerli' npx cucumber-js --tags "${{ matrix.tags }} ${{ inputs.environmentTags }} and not @mainnet"
E2ENETWORK='${{ inputs.testnet_network_value_for_e2e }}' npx cucumber-js --tags "${{ matrix.tags }} ${{ inputs.environmentTags }} and not @mainnet"
else
echo "Run in mainnet"
E2ENETWORK='${{ inputs.default_network_value_for_e2e }}' npx cucumber-js --tags "${{ matrix.tags }} ${{ inputs.environmentTags }} and not @testnet"
Expand Down
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@ volumes
cypress/videos/
cypress/screenshots/
tests/e2e/reports/
tests/e2e/artifacts/
**/tests/e2e/artifacts/

# Logs
logs
!/packages/worker/test/logs/
*.log
npm-debug.log*
yarn-debug.log*
Expand Down Expand Up @@ -53,7 +54,7 @@ lerna-debug.log*
!.vscode/extensions.json

# Allure
/allure-results/
**allure-results/

# App hyperchain config
hyperchain.config.json
24 changes: 13 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ flowchart
## 🛠 Installation

```bash
$ npm install
npm install
```

## ⚙️ Setting up env variables
Expand All @@ -63,7 +63,7 @@ Make sure you have [zksync-era](https://github.com/matter-labs/zksync-era) repo

The following script sets `.env` files for [Worker](./packages/worker) and [API](./packages/api) packages as well as environment configuration file for [App](./packages/app) package based on your local [zksync-era](https://github.com/matter-labs/zksync-era) repo setup.
```bash
$ npm run hyperchain:configure
npm run hyperchain:configure
```
You can review and edit generated files if you need to change any settings.

Expand All @@ -72,18 +72,18 @@ You can review and edit generated files if you need to change any settings.
Before running the solution, make sure you have a database server up and running, you have created a database and set up all the required environment variables.
To create a database run the following command:
```bash
$ npm run db:create
npm run db:create
```

To run all the packages (`Worker`, `API` and front-end `App`) in `development` mode run the following command from the root directory.
```bash
$ npm run dev
npm run dev
```

For `production` mode run:
```bash
$ npm run build
$ npm run start
npm run build
npm run start
```

Each component can also be started individually. Follow individual packages `README` for details.
Expand All @@ -105,15 +105,15 @@ To verify front-end `App` is running open http://localhost:3010 in your browser.
## 🕵️‍♂️ Testing
Run unit tests for all packages:
```bash
$ npm run test
npm run test
```
Run e2e tests for all packages:
```bash
$ npm run test:e2e
npm run test:e2e
```
Run tests for a specific package:
```bash
$ npm run test -w {package}
npm run test -w {package}
```
For more details on testing please check individual packages `README`.

Expand All @@ -129,7 +129,9 @@ zkSync Era Block Explorer is distributed under the terms of either
at your option.

## 🔗 Production links
- Testnet API: https://block-explorer-api.testnets.zksync.dev
- Testnet Goerli API: https://block-explorer-api.testnets.zksync.dev
- Testnet Sepolia API: https://block-explorer-api.sepolia.zksync.dev
- Mainnet API: https://block-explorer-api.mainnet.zksync.io
- Testnet App: https://goerli.explorer.zksync.io
- Testnet Goerli App: https://goerli.explorer.zksync.io
- Testnet Sepolia App: https://sepolia.explorer.zksync.io
- Mainnet App: https://explorer.zksync.io
Loading

0 comments on commit 293bac4

Please sign in to comment.