-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feature: badges * fix: update lock file * fix: update job summary * fix: update workflow * fix: workflow share output * fix: env needs * fix: raw output * fix: ci * fix: test * fix: test * fix: mapping * fix: test * fix: fix empty outputs * fix: outputs * fix: url * fix: ci fallback * Update ci.yaml * fix: remove not working fallbacks * test: check the flow from same repo * test: update * test: another * test: specific branch * test: try to get e2e coverage * fix: job summary deploy url * refactor: make coverage work: alias removed, babel styled components removed * feat: create coverage file for unit and another one for e2e tests, merge them and change format create coverage file for unit and another one for e2e tests, merge them and change format so that the coverage percentages include the values from both types of tests * chore: add babel-plugin-istanbul when the CI runs * chore: add postinstall package.json script * refactor: remove commented out code * ci: test coverage flow in PR * ci: testing pipeline * chore: remove explicit playwright install in ci * Update badges * ci: remove explicit run of tests as they run in the coverage step * feature: switch to codecov * Update ci_reusable.yaml * fix: try base setup * fix: pass secrets * fix: change token to be required * fix: coverage workflow * test * test * fix: update ci reusable workflow ref * fix: update readme and coverage workflow on pr * test * fix: update ci Co-authored-by: Rafał Mikucki <[email protected]> Co-authored-by: @bapp-ci-bot <[email protected]>
- Loading branch information
1 parent
f13c2e9
commit 711b8c7
Showing
42 changed files
with
6,691 additions
and
5,997 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
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
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
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 |
---|---|---|
@@ -1,4 +1,7 @@ | ||
# Boson Protocol dApp | ||
[](https://codecov.io/gh/bosonprotocol/interface) | ||
|
||
|
||
<a href="https://github.com/bosonprotocol/interface/actions/workflows/ci.yaml">[](https://github.com/bosonprotocol/interface/actions/workflows/ci.yaml)</a> | ||
|
||
| Env | Network | Endpoint | | ||
| ------------ | --------- | --------------------------------------------------------------- | | ||
|
@@ -11,7 +14,7 @@ | |
The required steps to develop and test the dApp interface locally are as follows: | ||
|
||
1. Clone the repository: i.e. Run `git clone [email protected]:bosonprotocol/interface.git` | ||
2. Navigate into the directory & install dependencies: i.e. Run `cd interface && npm ci` | ||
2. Navigate into the directory & install dependencies: i.e. Run `cd interface && npm ci` | ||
3. Copy the `.env.example` file to `.env` and fill out any necessary values. | ||
4. Start the application: i.e. Run `npm run dev` | ||
5. Navigate to `http://localhost:3000/` in a browser. | ||
|
@@ -20,7 +23,7 @@ The required steps to develop and test the dApp interface locally are as follows | |
|
||
### E2E | ||
|
||
Ensure Playwright browsers need to be installed on your system: | ||
Ensure Playwright browsers need to be installed on your system: | ||
|
||
```bash | ||
npx playwright install | ||
|
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 |
---|---|---|
@@ -1,12 +1,15 @@ | ||
// eslint-disable-next-line @typescript-eslint/no-var-requires | ||
const { override, addBabelPlugins } = require("customize-cra"); | ||
|
||
module.exports = override(addBabelPlugins("babel-plugin-styled-components")); | ||
|
||
// eslint-disable-next-line @typescript-eslint/no-var-requires | ||
const { alias, aliasJest, configPaths } = require("react-app-rewire-alias"); | ||
|
||
const aliasMap = configPaths("./tsconfig.paths.json"); | ||
|
||
module.exports = alias(aliasMap); | ||
module.exports.jest = aliasJest(aliasMap); | ||
// module.exports = override(addBabelPlugins("babel-plugin-styled-components")); | ||
module.exports = override( | ||
process.env.USE_BABEL_PLUGIN_ISTANBUL && | ||
addBabelPlugins("babel-plugin-istanbul") | ||
); | ||
// // eslint-disable-next-line @typescript-eslint/no-var-requires | ||
// const { alias, aliasJest, configPaths } = require("react-app-rewire-alias"); | ||
|
||
// const aliasMap = configPaths("./tsconfig.paths.json"); | ||
|
||
// module.exports = alias(aliasMap); | ||
// module.exports.jest = aliasJest(aliasMap); |
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
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
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
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
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
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
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,47 @@ | ||
import { test as baseTest } from "@playwright/test"; | ||
import * as crypto from "crypto"; | ||
import * as fs from "fs"; | ||
import * as path from "path"; | ||
|
||
const istanbulCLIOutput = path.join(process.cwd(), ".nyc_output"); | ||
|
||
export function generateUUID(): string { | ||
return crypto.randomBytes(16).toString("hex"); | ||
} | ||
|
||
export const test = baseTest.extend({ | ||
context: async ({ context }, use) => { | ||
await context.addInitScript(() => | ||
window.addEventListener("beforeunload", () => { | ||
return (window as any).collectIstanbulCoverage( | ||
JSON.stringify((window as any).__coverage__) | ||
); | ||
}) | ||
); | ||
await fs.promises.mkdir(istanbulCLIOutput, { recursive: true }); | ||
await context.exposeFunction( | ||
"collectIstanbulCoverage", | ||
(coverageJSON: string) => { | ||
if (coverageJSON) { | ||
fs.writeFileSync( | ||
path.join( | ||
istanbulCLIOutput, | ||
`playwright_coverage_${generateUUID()}.json` | ||
), | ||
coverageJSON | ||
); | ||
} | ||
} | ||
); | ||
await use(context); | ||
for (const page of context.pages()) { | ||
await page.evaluate(() => | ||
(window as any).collectIstanbulCoverage( | ||
JSON.stringify((window as any).__coverage__) | ||
) | ||
); | ||
} | ||
} | ||
}); | ||
|
||
export const expect = test.expect; |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import { CONFIG } from "@lib/config"; | ||
import { CONFIG } from "../src/lib/config"; | ||
|
||
export const graphqlEndpoint = | ||
"**/" + CONFIG.subgraphUrl.substring("https://".length); |
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
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
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
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
Oops, something went wrong.