Skip to content

Commit

Permalink
feat: add tests (#1220)
Browse files Browse the repository at this point in the history
  • Loading branch information
windingwind authored Dec 9, 2024
1 parent c4a88df commit 65c220f
Show file tree
Hide file tree
Showing 17 changed files with 1,378 additions and 1,838 deletions.
27 changes: 26 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,43 @@
name: Release
name: CI

on:
push:
tags:
- v**
pull_request:
branches:
- master

permissions:
contents: write
issues: write
pull-requests: write

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20

- name: Install deps
run: npm install -f

- name: Test
run: npm test

# If it's triggered by a tag and the test job is successful, release the package
release:
runs-on: ubuntu-latest
needs: test
if: github.event_name == 'push' && needs.test.result == 'success'
env:
# Allow triggering other workflows
GITHUB_TOKEN: ${{ secrets.PAT }}
Expand Down
2 changes: 1 addition & 1 deletion addon/bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ async function startup({ id, version, resourceURI, rootURI }, reason) {
`${rootURI}/chrome/content/scripts/__addonRef__.js`,
ctx,
);
Zotero.__addonInstance__.hooks.onStartup();
await Zotero.__addonInstance__.hooks.onStartup();
}

function onMainWindowLoad({ window: win }) {
Expand Down
Loading

0 comments on commit 65c220f

Please sign in to comment.