Skip to content

Commit

Permalink
test on windows-latest
Browse files Browse the repository at this point in the history
  • Loading branch information
mmkal committed Aug 27, 2024
1 parent 98fb5ae commit 0ee4338
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ jobs:
- run: pnpm test -- --coverage
- name: Coverage
uses: codecov/codecov-action@v3
run_windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- run: corepack enable
- run: pnpm install
- run: pnpm test
create_tgz:
runs-on: ubuntu-latest
steps:
Expand Down
2 changes: 2 additions & 0 deletions examples/0.5-vanilla-esm/migrate.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import { Umzug, JSONStorage } from 'umzug';

const __dirname = new URL('.', import.meta.url).pathname.replace(/\/$/, '');

if (__dirname.includes('D:\\D:\\')) throw new Error(JSON.stringify({__dirname, importMetaUrl: import.meta.url}))

export const migrator = new Umzug({
migrations: {
glob: 'migrations/*.*js',
Expand Down
1 change: 1 addition & 0 deletions src/storage/json.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const filesystem = {
},
/** writes a string as file contents, creating its parent directory if necessary */
async writeAsync(filepath: string, content: string) {
if (filepath.startsWith('D:\\D:\\')) throw new Error(`Incorrect filepath: ${filepath}. Content: ${content}`)
await fs.mkdir(path.dirname(filepath), {recursive: true})
await fs.writeFile(filepath, content)
},
Expand Down

0 comments on commit 0ee4338

Please sign in to comment.