Skip to content

Commit

Permalink
ci: fix by installing latest obsidian dep (#122)
Browse files Browse the repository at this point in the history
* ci: fix ci by tagging obsidian to latest
* Update build.yml
* Update other worflows
  • Loading branch information
ShootingKing-AM authored Jul 30, 2023
1 parent fce45d8 commit 78c91f3
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
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

0 comments on commit 78c91f3

Please sign in to comment.