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

Add NodeJS CI Workflow #5

Open
lelouchB opened this issue Oct 5, 2020 · 17 comments · Fixed by #104
Open

Add NodeJS CI Workflow #5

lelouchB opened this issue Oct 5, 2020 · 17 comments · Fixed by #104
Assignees
Labels

Comments

@lelouchB
Copy link
Owner

lelouchB commented Oct 5, 2020

Relies on #2 i.e. after Tests have been written.

Here is a possible

name: Node.js CI

on: [push]

jobs:
  build:

    runs-on: ubuntu-latest

    strategy:
      matrix:
        node-version: [8.x, 10.x, 12.x]

    steps:
    - uses: actions/checkout@v2
    - name: Use Node.js ${{ matrix.node-version }}
      uses: actions/setup-node@v1
      with:
        node-version: ${{ matrix.node-version }}
    - run: npm install
    - run: npm run build --if-present
    - run: npm test
      env:
        CI: true
@lelouchB lelouchB added hacktoberfest help wanted Extra attention is needed tests labels Oct 5, 2020
@trybick
Copy link
Contributor

trybick commented Oct 6, 2020

I've worked with github actions/workflows before. Can I take this one after the tests are written?

@lelouchB
Copy link
Owner Author

lelouchB commented Oct 6, 2020

Ofcourse @trybick
@JuanVqz is working on #2
In the meantime, I will assign this to you.

Thanks

@lelouchB
Copy link
Owner Author

lelouchB commented Oct 8, 2020

@trybick
Would you like to work on the tests in frontend i.e. docusarus while backend tests are being made?

In this Workflow, we will add both these tests.

@trybick
Copy link
Contributor

trybick commented Oct 8, 2020

I'm happy to do the workflow, but will pass on the tests, but thanks for the offer.

@lelouchB
Copy link
Owner Author

lelouchB commented Oct 8, 2020

Hey @trybick
backend tests are in progress, in the mean time
Can you start on the frontend CI workflow that tests if the frontend build command i.e. npm run build is successful or not.

Let me know if you have any questions.

@trybick
Copy link
Contributor

trybick commented Oct 8, 2020

Yes I can start on the workflow - I should be able to start it tonight or next night 👍

@lelouchB
Copy link
Owner Author

lelouchB commented Oct 8, 2020

Great 👍
here is a resource on this
https://v2.docusaurus.io/docs/deployment/#using-azure-pipelines
https://v2.docusaurus.io/docs/deployment/#triggering-deployment-with-travis-ci

P.S. no deploy command needed, only build

Thanks :)

@trybick
Copy link
Contributor

trybick commented Oct 8, 2020

@lelouchB I am confused about those two links - the original issue at the top has an example of a github workflow to run the tests, right? I thought that would do it

@lelouchB
Copy link
Owner Author

lelouchB commented Oct 8, 2020

Yes, the issue is for tests but there are no tests for frontend so currently a workflow to check build will be really helpful. because of the issues related to frontend.

After the backend tests are done, workflow will be updated to accomodate them

Does this make sense?
Let me know if you have any other questions

@trybick
Copy link
Contributor

trybick commented Oct 8, 2020

Still a little confused - We want a workflow to run the tests but those are on hold until backend tests are done. In the mean time we want to a workflow to run the build command? Does it need to deploy anywhere - or just check that build is successful?

@lelouchB
Copy link
Owner Author

lelouchB commented Oct 8, 2020

Still a little confused - We want a workflow to run the tests but those are on hold until backend tests are done. In the mean time we want to a workflow to run the build command? Does it need to deploy anywhere - or just check that build is successful?

Yes that's correct.

I am fine with build only but if you want you can add deploy command too. It can be helpful to see actual changes.
What do you think?

@trybick
Copy link
Contributor

trybick commented Oct 8, 2020

Ok, just to confirm, the build workflow would just confirm the build is successful and then exit right? If we wanted to deploy too I think that would involve a lot more

@lelouchB
Copy link
Owner Author

lelouchB commented Oct 8, 2020

Ok, just to confirm, the build workflow would just confirm the build is successful and then exit right? If we wanted to deploy too I think that would involve a lot more

Yes, it will tell if the build is successful and then exit.
yep, the deployment preview will involve a lot more so we can take it step by step. build is a priority right now so we should proceed with it first.

Thanks

@trybick
Copy link
Contributor

trybick commented Oct 8, 2020

Ok, thanks for clarifying!

@lelouchB
Copy link
Owner Author

lelouchB commented Oct 9, 2020

Hey @trybick
Lint script has been added to backend, do you think you an add it to workflow?

Thanks

@trybick
Copy link
Contributor

trybick commented Oct 9, 2020

Hey @lelouchB sure! Would that be a new workflow to just run the lint command in the backend?

I also was thinking, would you want a pre-commit hook added? - so every time someone commits it lints and prettifies the code - an option if you want to consider :)

@lelouchB
Copy link
Owner Author

lelouchB commented Oct 9, 2020

Hey @lelouchB sure! Would that be a new workflow to just run the lint command in the backend?

I also was thinking, would you want a pre-commit hook added? - so every time someone commits it lints and prettifies the code - an option if you want to consider :)

Yes yes that pre commit hook would be amazing too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants