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

baseline platformics CI #32

Merged
merged 20 commits into from
Jun 7, 2024
Merged

baseline platformics CI #32

merged 20 commits into from
Jun 7, 2024

Conversation

ninabernick
Copy link
Collaborator

@ninabernick ninabernick commented May 30, 2024

Sets up two workflows:

  • build and push docker image to Github container registry on pushes to main (I tested this by running it on every push, then changing it to only running on pushes to main)
  • build and run pytest on every push

Could be combined into a single build + push + test workflow if we wanted.
In the future, we could build and push docker images on every push and also use caching to speed up builds.

@ninabernick ninabernick force-pushed the ninabernick/ci branch 2 times, most recently from c045b29 to 2b16785 Compare June 4, 2024 21:32
@ninabernick ninabernick linked an issue Jun 5, 2024 that may be closed by this pull request
@ninabernick ninabernick changed the title ci for tests baseline platformics CI Jun 5, 2024
@@ -46,6 +46,7 @@ init:
$(docker_compose_run) $(APP_CONTAINER) sh -c 'strawberry export-schema main:schema > /app/api/schema.graphql'
sleep 5 # wait for the app to reload after having files updated.
docker compose up -d
sleep 5
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

added because the following line was unable to connect to the port

@ninabernick ninabernick marked this pull request as ready for review June 5, 2024 19:16
@ninabernick ninabernick requested review from jgadling and rzlim08 June 5, 2024 19:16
name: Build and test

on:
push
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we only want to run this on PR's, and on the main branch, rather than every pushed commit.

jobs:
cancel-previous:
runs-on: ubuntu-latest
steps:
Copy link
Contributor

Choose a reason for hiding this comment

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

This should probably only cancel previous builds on the same branch, rather than all in-progress builds

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think it does by default! But also apparently I can just use concurrency instead

@ninabernick ninabernick merged commit 10b33d7 into main Jun 7, 2024
1 check failed
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.

CI workflows
2 participants