Skip to content

Commit

Permalink
Build and use local libauth
Browse files Browse the repository at this point in the history
  • Loading branch information
bitjson committed Jan 18, 2024
1 parent 0fd1469 commit bcddafa
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 10 deletions.
1 change: 1 addition & 0 deletions .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"CHECKSIG",
"CHECKSIGVERIFY",
"Codecov",
"corepack",
"Dreyzehner",
"EQUALVERIFY",
"filechooser",
Expand Down
8 changes: 7 additions & 1 deletion .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,13 @@ module.exports = {
'plugin:react/jsx-runtime',
'plugin:react-hooks/recommended',
],
ignorePatterns: ['coverage', 'dist', 'libauth', '.eslintrc.cjs'],
ignorePatterns: [
'coverage',
'dist',
'libauth',
'playwright-report',
'.eslintrc.cjs',
],
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint', 'import', 'react-refresh'],
settings: {
Expand Down
16 changes: 11 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,31 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
submodules: 'recursive'
- uses: actions/setup-node@v4
with:
node-version: 20
- run: yarn install --immutable --immutable-cache
- run: yarn test:lint

prod-e2e:
timeout-minutes: 5
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/playwright:v1.41.0-jammy
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
submodules: 'recursive'
- uses: actions/setup-node@v4
with:
node-version: 20
# The "preinstall" script runs "git submodule update --init --recursive"
# to avoid requiring users to understand this project's submodules
# configuration. Since the files are owned by a different user than the
# GitHub Action runner (a quirk of GitHub Actions), updating the
# submodules again would error: `fatal: detected dubious ownership in repository at '/__w/bitauth-ide/bitauth-ide'`
# We can safely disable this check for CI.
- run: git config --global --add safe.directory '*'
- run: yarn install --immutable --immutable-cache
- run: yarn build
- run: yarn test:e2e:prod
Expand All @@ -38,17 +44,17 @@ jobs:
- uses: codecov/codecov-action@v3

dev-e2e-and-coverage:
timeout-minutes: 5
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/playwright:v1.41.0-jammy
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
submodules: 'recursive'
- uses: actions/setup-node@v4
with:
node-version: 20
- run: git config --global --add safe.directory '*'
- run: yarn install --immutable --immutable-cache
- run: yarn test:e2e
- uses: actions/upload-artifact@v4
Expand Down
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,10 @@ Read more about it in [the blog post](https://blog.bitjson.com/bitauth-ide-write

Pull Requests are welcome!

This application requires [Yarn](https://yarnpkg.com/) for development. If you don't have Yarn, make sure you have `Node.js` installed, then run `npm install -g yarn`. Once Yarn is installed, recursive-clone `bitauth-ide` and run the `start` package script:
This application requires [Yarn](https://yarnpkg.com/) for development. With `Node.js` installed, the `yarn` package manager can be installed by running `corepack enable`. Once `yarn` is installed:

```sh
# note the use of --recursive to clone submodules
git clone --recursive https://github.com/bitauth/bitauth-ide.git
git clone https://github.com/bitauth/bitauth-ide.git
cd bitauth-ide
yarn
yarn start
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
"workbox-window": "^7.0.0"
},
"scripts": {
"preinstall": "git submodule update --init --recursive && cd libauth && yarn && yarn build",
"start": "vite",
"build": "tsc && vite build",
"preview": "vite preview",
Expand Down
2 changes: 1 addition & 1 deletion src/editor/dialogs/guide-dialog/GuideDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export const GuideDialog = ({
</p>
<h3>Scripts</h3>
<p>
All Bitauth templates define a set of scripts which are used by its
Every Bitauth templates define a set of scripts which are used by its
entities. There are 4 types of scripts:
</p>
<ul>
Expand Down

0 comments on commit bcddafa

Please sign in to comment.