-
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.
* install firebase * install use-async-effect * add useDocument hook * install vitest * configure and add sample test for vitest * install @testing-library/react * install jsdom * run and exit vitest * set environment to jsdom * add sample component test * install firebase-tools * install concurrently * ignore log files * add firebase:emulators script * add firebase config * add sample test for hook test * add test action * change name for checkout step * add step to start firebase emulator * fix firebase emulator step order * add lint:check script * add lint checking job * rename test workflow to check * add formatter:check script * add job for formatter:check script * set options optional * hide dist dir * add initial test for useDocument hook * install happy-dom * use happy-dom * add test for useDocument hook > should initially have no snapshot * test useDocument hook > should initially have no error * add firebase:emulators:download script * rename firebase:emulators script to firebase:emulators:run * add download firebase emulators step to test job * add explanation as to why to use happy-dom instead of jsdom * set loading state to false when complete * test later useDocument hook * install sleep-sleep * use sleep-sleep * add closures for onError and onCompletion * include metadata changes on listen * test for later listen useDocument hook * hide and ignore coverage dir * install v8 coverage * add coverage to test job in check workflow * add badge for coverage * run check workflow on push to main * add check workflow badge * add publish workflow
- Loading branch information
Showing
14 changed files
with
11,523 additions
and
2,534 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,46 @@ | ||
name: "Check" | ||
on: | ||
pull_request: | ||
push: | ||
branches: main | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: "Checkout repository" | ||
uses: actions/checkout@v3 | ||
- name: "Install dependencies" | ||
run: npm i | ||
- name: "Download Firebase Emulators" | ||
run: npm run firebase:emulators:download | ||
- name: "Run Firebase Emulators" | ||
run: npm run firebase:emulators:run & | ||
- name: "Wait for Firebase Emulators" | ||
run: sleep 10 | ||
- name: "Test" | ||
run: npm run test | ||
- name: "Analyze Coverage" | ||
run: npm run test:coverage | ||
- name: "Upload Coverage" | ||
uses: codecov/codecov-action@v3 | ||
env: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
lint: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: "Checkout repository" | ||
uses: actions/checkout@v3 | ||
- name: "Install dependencies" | ||
run: npm i | ||
- name: "Check Linting" | ||
run: npm run lint:check | ||
formatter: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: "Checkout repository" | ||
uses: actions/checkout@v3 | ||
- name: "Install dependencies" | ||
run: npm i | ||
- name: "Check Formatting" | ||
run: npm run formatter: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 @@ | ||
name: Publish | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: "Checkout code" | ||
uses: actions/checkout@v4 | ||
- name: "Setup Node" | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: "18.16.0" | ||
registry-url: "https://registry.npmjs.org" | ||
- name: "Switch to Node CI Environment" | ||
run: npm ci | ||
- name: "Build Project" | ||
run: rm -rfv dist && npm run build | ||
- run: npm publish | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }} |
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 |
---|---|---|
|
@@ -2,4 +2,7 @@ node_modules | |
dist | ||
|
||
#storybook build directory | ||
storybook-static | ||
storybook-static | ||
|
||
**/*.log | ||
coverage/ |
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,3 +1,6 @@ | ||
# Fireact | ||
|
||
 | ||
 | ||
|
||
A Firebase hooks library for React. |
Oops, something went wrong.