-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(client): next version initial commit (#36)
* feat(client): next version initial commit * feat(user): Added user endpoints * feat(client): added missing endpoints * test(form): added form tests * test(user): added user tests made max worker 1 * docs(form): added form api jsdoc * docs(folder): added jsdoc to folder * docs(report): added jsdoc to report * docs(submission): added jsdoc to submission * docs(user): added jsdoc to user * test(folder): added tests to folder * test(report): added report test * chore(bundling): migrated to pure tsc * fix(tests): fix tests and test the built library * chore(ci): added github actions templates
- Loading branch information
Showing
37 changed files
with
5,348 additions
and
1,279 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,41 @@ | ||
name: Build and Test | ||
on: | ||
# manual trigger | ||
workflow_dispatch: | ||
# reuse workflow run | ||
workflow_call: | ||
# on pull request | ||
pull_request: | ||
# on push to master branch | ||
push: | ||
branches: | ||
- 'master' | ||
- 'next' | ||
jobs: | ||
build-test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20 | ||
registry-url: https://registry.npmjs.org/ | ||
|
||
- name: Cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: node_modules | ||
key: ${{ runner.os }}-package-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-package- | ||
- name: Install dependencies | ||
run: npm i | ||
|
||
- name: Run tests | ||
run: npm run test | ||
env: | ||
JF_API_KEY: ${{ secrets.TEST_USER_API_KEY }} | ||
|
||
- name: Build package | ||
run: npm run build |
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,40 @@ | ||
name: Publish | ||
on: | ||
# on release | ||
release: | ||
types: [released, prereleased] | ||
|
||
jobs: | ||
build-test: | ||
uses: ./.github/workflows/build-test.yml | ||
publish: | ||
needs: build-test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20 | ||
|
||
- name: Cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: node_modules | ||
key: ${{ runner.os }}-package-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-package- | ||
- name: Build package | ||
run: npm run build | ||
|
||
- name: Publish package | ||
if: github.event_name == 'release' && github.event.release.draft == false | ||
run: | | ||
if [[ ${{ github.event.release.prerelease }} == true || ${{ github.event.release.tag_name }} =~ -alpha|-beta|-rc ]]; then | ||
npm publish --tag next | ||
else | ||
npm publish --tag latest | ||
fi | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_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 |
---|---|---|
@@ -1 +1,2 @@ | ||
node_modules/ | ||
node_modules/ | ||
dist/ |
Oops, something went wrong.