Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
gitlabdemo
Manage
Activity
Members
Labels
Plan
Issues
7
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Coalson, Ben
gitlabdemo
Commits
c21c36a5
Commit
c21c36a5
authored
11 months ago
by
Ross Cain
Browse files
Options
Downloads
Patches
Plain Diff
Add simple pipeline for build and test
parent
3ae66770
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+25
-0
25 additions, 0 deletions
.gitlab-ci.yml
with
25 additions
and
0 deletions
.gitlab-ci.yml
0 → 100644
+
25
−
0
View file @
c21c36a5
stages
:
-
build
-
test
image
:
node:17
build_app
:
stage
:
build
before_script
:
-
export NODE_OPTIONS=--openssl-legacy-provider
script
:
-
yarn install
-
yarn upgrade
-
yarn run build
-
yarn cache clean
unit_test
:
stage
:
test
before_script
:
-
yarn add chai@4.4.0 mocha mocha-simple-html-reporter mocha-junit-reporter chai-http mocha-test-url
script
:
-
./node_modules/mocha/bin/_mocha "test/*.js" --reporter mocha-junit-reporter --reporter-options mochaFile=./testresults/test-results.xml
-
./node_modules/mocha/bin/_mocha "test/*.js" --reporter mocha-simple-html-reporter --reporter-options output=./testresults/test-results.html
after_script
:
-
echo "unit_test job has run!"
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment