-
Notifications
You must be signed in to change notification settings - Fork 5
Migrate form CircleCi to Github Actions #296
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
base: master
Are you sure you want to change the base?
Changes from all commits
cac1df6
81394f2
cfd2bbc
b9bf0be
ee3b39a
1101451
60a46ac
819218e
eba148a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| name: Continuous Integration | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| - master | ||
| - develop | ||
| pull_request: | ||
| branches: | ||
| - main | ||
| - master | ||
| - develop | ||
|
|
||
| jobs: | ||
| test: | ||
| name: Build & Test | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: 24 | ||
| cache: 'npm' | ||
|
|
||
| - name: Install dependencies | ||
| run: npm ci | ||
|
|
||
| - name: Run linter | ||
| run: npm run lint | ||
|
|
||
| # - name: Check formatting | ||
| # run: npm run format:check | ||
|
|
||
| - name: Install JUnit coverage reporter | ||
| run: npm install --save-dev jest-junit | ||
|
|
||
| - name: Run tests | ||
| run: npm test -- --ci --reporters=default --reporters=jest-junit | ||
|
|
||
| - name: Build | ||
| run: npm run build | ||
|
|
||
| - uses: actions/upload-artifact@v4 | ||
| if: ${{ !cancelled() }} | ||
| with: | ||
| name: test-results | ||
| path: jest-junit.xml | ||
| env: | ||
| JEST_JUNIT_OUTPUT_NAME: jest-junit.xml | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| name: Deploy Release | ||
|
|
||
| on: | ||
| push: | ||
| tags: | ||
| - 'v*' | ||
|
|
||
| jobs: | ||
| deploy: | ||
| name: Deploy Release | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| id-token: write | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. On en parlait ce matin, mais je viens de relire la doc et ceci permet d'établir un lien d'origine côté NPM. Il faut quand même conserver le token (ce qui est le cas plus bas) mais il me semblait qu'ils avaient rendu obligatoires les token à droits plus granulaires et que ceux-ci avaient une durée de vie limitée. Ou alors c'est une volonté de sécurité de limiter la vie des tokens et c'est indépendant de leur statut granulaire ou non. |
||
| steps: | ||
| - uses: actions/checkout@v5 | ||
|
|
||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: 24 | ||
| cache: 'npm' | ||
| registry-url: 'https://registry.npmjs.org' | ||
|
|
||
| - name: Install dependencies | ||
| run: npm ci | ||
|
|
||
| - name: Build | ||
| run: npm run build | ||
|
|
||
| - name: Publish to NPM | ||
| run: npm publish --provenance --access public | ||
| env: | ||
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A-t-on besoin de déclencher la CI pour un push ou lors de la création d'une PR qui se base sur main ou develop ? Seule la branche master existe, non ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oui effectivement, je me suis fais la même reflexion mais je me suis dis "au cas où, ça mange pas de pain" 😄