Skip to content

Commit

Permalink
Fix tests, install changesets cli (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
lkostrowski authored Oct 6, 2023
1 parent 46a9ef1 commit 4756c82
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 10 deletions.
5 changes: 5 additions & 0 deletions .changeset/cold-berries-argue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"saleor-app-payment-template": patch
---

Fixes tests that were failing from the template
2 changes: 1 addition & 1 deletion .dependency-cruiser.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/** @type {import('dependency-cruiser').IConfiguration} */
module.exports = {
export default {
forbidden: [
/* rules from the 'recommended' preset: */
{
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
merge_group:
push:
branches:
- canary
- main

concurrency:
group: tests-${{ github.event.pull_request.number || github.ref }}
Expand Down Expand Up @@ -60,12 +60,12 @@ jobs:
if: ${{ github.event_name != 'push' }}
run: pnpm exec dependency-cruiser src

- name: Download coverage report from canary
- name: Download coverage report from main branch
if: ${{ github.event_name != 'push' }}
uses: dawidd6/action-download-artifact@v2
with:
workflow_conclusion: success
branch: canary
branch: main
event: push
name: coverage-artifacts
path: coverage-main/
Expand All @@ -79,7 +79,7 @@ jobs:
base-coverage-file: coverage-main/report.json

- name: Upload coverage report
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/canary' }}
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
uses: actions/upload-artifact@v3
with:
name: coverage-artifacts
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"test": "vitest",
"test:record": "POLLY_MODE=record_missing vitest",
"test:rerecord": "POLLY_MODE=record vitest",
"test:ci": "CI=true vitest --coverage --reporter=json --reporter=default && tsx fix-coverage-report.ts",
"test:ci": "CI=true vitest --coverage --reporter=json --reporter=default && ./fix-coverage-report.cjs",
"migrate": "pnpm tsx ./src/run-migrations.ts",
"ts-node-esm": "node --loader ts-node/esm --experimental-specifier-resolution=node",
"prepare": "husky install",
Expand Down Expand Up @@ -131,7 +131,8 @@
"setup-polly-jest": "0.11.0",
"ts-node": "10.9.1",
"typescript": "5.1.6",
"vite-tsconfig-paths": "4.2.0"
"vite-tsconfig-paths": "4.2.0",
"@changesets/cli": "^2.26.2"
},
"engines": {
"npm": ">=8.0.0 <10.0.0",
Expand Down
3 changes: 3 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions src/backend-lib/api-route-utils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -282,11 +282,11 @@ describe("api-route-utils", () => {
} as unknown as NextApiRequest),
).resolves.toMatchInlineSnapshot(`
{
"appId": "a",
"appId": "${testEnv.TEST_SALEOR_APP_ID}",
"domain": "saleor.localhost",
"jwks": "",
"saleorApiUrl": "https://saleor.localhost:8080/graphql/",
"token": "a",
"saleorApiUrl": "${testEnv.TEST_SALEOR_API_URL}",
"token": "",
}
`);
});
Expand Down

0 comments on commit 4756c82

Please sign in to comment.