Skip to content

ci: add os matrix to run tests on windows#261

Merged
kgajera merged 3 commits intocanaryfrom
ci/add-os-matrix-with-windows
May 25, 2022
Merged

ci: add os matrix to run tests on windows#261
kgajera merged 3 commits intocanaryfrom
ci/add-os-matrix-with-windows

Conversation

@kgajera
Copy link
Copy Markdown
Contributor

@kgajera kgajera commented May 20, 2022

Changes

https://github.com/echobind/bisonapp/actions/runs/2386787858

  • Refactors CI into multiple jobs. I did remove Node 18 from the node matrix, just because it seems excessive after introducing the OS matrix.
    • "create-app" Job
      • this runs on both Windows and Ubuntu
      • this will create a new bison app to ensure our CLI functionality works and uploads the app as an artifact
    • "test" Job
      • this runs on Ubuntu only because a Postgres container is required and is only supported in Linux environments
      • this downloads the app artifact from the previous job and will run lint, unit and end-to-end tests
  • Fixes bugs in Windows copying template files when creating a new app
  • Had to upgrade TypeScript and related dependencies to fix new errors with ts-node-dev. These would occur in new bison apps even without any changes introduced by this PR.

Fixes #127

@kgajera kgajera marked this pull request as draft May 20, 2022 21:20
Copy link
Copy Markdown
Contributor

@code-jenn-or code-jenn-or left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will be a big win!

@kgajera kgajera force-pushed the ci/add-os-matrix-with-windows branch 17 times, most recently from e960913 to 4cacc74 Compare May 25, 2022 19:27
@kgajera kgajera force-pushed the ci/add-os-matrix-with-windows branch from 4cacc74 to 08ea92f Compare May 25, 2022 19:35
@kgajera kgajera force-pushed the ci/add-os-matrix-with-windows branch from 08ea92f to f7ddd8c Compare May 25, 2022 19:52
@kgajera kgajera marked this pull request as ready for review May 25, 2022 20:25
- name: Set up test database
env:
DATABASE_URL: postgresql://postgres:postgres@localhost/${{ steps.create-app.outputs.appName }}_test
DATABASE_URL: postgresql://postgres:postgres@localhost/${{ needs.create-app.outputs.appName }}_test
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love when I learn a new part of the capabilities by reviewing a PR. needs is something I hadn't seen before.

"typescript": "^4.4.3"
"ts-node-dev": "^2.0.0-0",
"tsconfig-paths": "^4.0.0",
"typescript": "^4.7.2"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good upgrades!

files.map(async (file) => {
const toFile = cleanTemplateDestPath(file.replace(from, to));
// Normalize the file path for Windows to ensure back-slashes are used
const filePath = path.normalize(file);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great addition!

Copy link
Copy Markdown
Contributor

@code-jenn-or code-jenn-or left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great and all the tests are passing for both OS and node matrices.

@kgajera kgajera merged commit 6ad37f7 into canary May 25, 2022
@kgajera kgajera deleted the ci/add-os-matrix-with-windows branch May 25, 2022 20:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pages, grapjql, prisma/.env missing after installation

3 participants