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

Setup CI/CD workflow for unit testing #37

Merged
merged 10 commits into from
Oct 15, 2023
Merged

Setup CI/CD workflow for unit testing #37

merged 10 commits into from
Oct 15, 2023

Conversation

shirleyfyx
Copy link
Contributor

@shirleyfyx shirleyfyx commented Oct 14, 2023

image


This change is Reviewable

@shirleyfyx shirleyfyx self-assigned this Oct 14, 2023
Copy link
Member

@QuantumManiac QuantumManiac left a comment

Choose a reason for hiding this comment

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

Looks good so far! Just a few comments.

Reviewed 1 of 1 files at r3, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @shirleyfyx)


.github/workflows/test.yml line 30 at r3 (raw file):

      - name: Install dependencies
        run: yarn install
        working-directory: ../minerva-rewrite/

I'm actually not sure why we set the working directory as such because the default working directory should be that anyway. Do you want to try removing these lines and seeing if it actually works?


.github/workflows/test.yml line 33 at r3 (raw file):

      
      - name: Run unit tests
        run: yarn test --passWithNoTests

Have you tried testing this workflow with tests actually existing?

@shirleyfyx
Copy link
Contributor Author

GitHub Actions workflow is correctly set up and running with dummy test cases.

image

@QuantumManiac QuantumManiac requested a review from a team October 14, 2023 15:11
@shirleyfyx
Copy link
Contributor Author

Works without working-directory.

image

@shirleyfyx shirleyfyx closed this Oct 14, 2023
@shirleyfyx shirleyfyx deleted the unit-test branch October 14, 2023 15:41
@shirleyfyx shirleyfyx restored the unit-test branch October 14, 2023 15:42
@shirleyfyx shirleyfyx reopened this Oct 14, 2023
Copy link
Member

@QuantumManiac QuantumManiac left a comment

Choose a reason for hiding this comment

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

Reviewed 2 of 2 files at r5, 1 of 1 files at r6, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @shirleyfyx)


.github/workflows/test.yml line 8 at r6 (raw file):

        - 'main'
        - 'development'
    pull_request:

I don't think we need pull_request because the code being used in the PR will already have been tested due to the push condition. If you take a look at this PR, you can see that this workflow was run twice: once for opening the PR and another for pushing the commits in it.

Copy link
Member

@QuantumManiac QuantumManiac left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 1 of 1 files at r7, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @shirleyfyx)

@shirleyfyx shirleyfyx merged commit 4794ac0 into main Oct 15, 2023
2 checks passed
@shirleyfyx shirleyfyx deleted the unit-test branch October 15, 2023 21:21
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.

GitHub Actions workflows - Unit Testing on push
2 participants