-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* ft(CI):create workflow file -we are creating workflow file -we are runing test,linting and build for the workflow -right now we are not run deployment. story id: #17 * bug(CI):change super linter version -i changed the version of github super linter to latest version #17 * bug(ci):add if statement on run test line -the script run test is not present in packege.json -if not present pass it with no error #17 * bg(ci):add git token _super linter new git token to report the status #17 * bug(ci): change the run lint line - am nolonger using super linter #17 * bug(ci):chnage run test - i have changed npm test to -npm runtest #17 * fix(backend):upload coverage to coverolls -we are adding the script to help upload the coverage #17 * fix:check if the coverage works * fix:allow coverage empty * fix: now test coverage with the lint * fix: come back to coomit with no confict fix: lint * fix: fix all bugs - the env file was created -env file contain all need valiables #17 * fix: change the env valiable #17 * fix: change the linking * fix: linting
- Loading branch information
Showing
4 changed files
with
48 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: CI for ecomm-project for Dynamite | ||
|
||
on: | ||
push: | ||
branches: [ "develop" ] | ||
pull_request: | ||
branches: [ "develop" ] | ||
|
||
jobs: | ||
build: | ||
#git hub offer virtual machines to run workflows so we will be using ubuntu lastest version its standand one | ||
#we using ubuntu because we want to use lunex terminal | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
#each version we specify we be tested on | ||
#we are only limited to 3 versions | ||
node-version: [16.x, 18.x, 20.x] | ||
|
||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Use Node.js ${{ matrix.node-version }} #this will help use know which version we are testing on. | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: 'npm' #this we help speed up the workflow by reusing dependencies from previous runs | ||
- run: npm ci #run dependencies installing we using ci in place of 'npm install' becouse ci(clearn install) is smooth and faster | ||
- run: npm run test --if-present #this line will run test script | ||
- run: npm run lint --if-present # run tle | ||
- run: npm run build --if-present # we using if statement because initial the code have no build script in packege.json | ||
- run: npm run test:ci --if-present # this will run test with coverage flag | ||
|
||
- name: Upload coverage to Coveralls | ||
uses: coverallsapp/github-action@v2 | ||
with: | ||
allow-empty: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters