Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: fix by installing latest obsidian dep #122

Merged
merged 5 commits into from
Jul 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,30 @@ jobs:
strategy:
matrix:
node-version: [18.x]
install-exact: [1, 0]

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
# obsidian package often fails integrity checks since its a tarball, hence will get the get the tarball -> npm will cache it -> npm ci will test integrity of that cache vs package-lock.json
# https://github.com/ShootingKing-AM/Obsidian_to_Anki/pull/122
# Installing exact tree would be used in CI/CD to exactly reproduce tests
- name: Node install exact tree
if: matrix.install-exact == 1
run: |
npm install obsidian
npm ci

# Install latest tree would be usually done by devs/who locally build the plugin
- name: Node install latest tree
if: matrix.install-exact == 0
run: |
npm update
npm install

- run: npm run build --if-present
# - run: npm test

Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/test-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_V }}
- run: npm ci
- run: |
npm install obsidian
npm ci
- run: npm run build --if-present

- name: Run Tests
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"chromedriver": "^100.0.0",
"devtools": "^8.12.1",
"glob": "^9.3.0",
"obsidian": "https://github.com/obsidianmd/obsidian-api/tarball/master",
"obsidian": "latest",
"rollup": "^2.32.1",
"rollup-plugin-node-polyfills": "^0.2.1",
"showdown-highlight": "^3.1.0",
Expand Down
Loading