Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
js-frontend-tutorial js-frontend-tutorial
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • ci-general
  • js-frontend-tutorialjs-frontend-tutorial
  • Wiki
  • Configure GitLab CI

Configure GitLab CI · Changes

Page history
Create gitlab ci authored Jul 11, 2019 by Taras Gaidukov's avatar Taras Gaidukov
Show whitespace changes
Inline Side-by-side
Showing with 32 additions and 0 deletions
+32 -0
  • Configure-GitLab-CI.md Configure-GitLab-CI.md +32 -0
  • No files found.
Configure-GitLab-CI.md 0 → 100644
View page @ 305cb45c
# Configure GitLab CI
https://docs.gitlab.com/ee/ci/yaml/
## Write .gitlab-ci.yml file
Now we need to create the `.gitlab-ci.yml` file in the root of the project:
```
image: node-protractor:latest
cache:
untracked: true
key: "$CI_BUILD_REF_NAME"
paths:
- node_modules/
before_script:
- npm install
unit_tests:
script:
- npm run test-ci
e2e_tests:
before_script:
- npm run http-server-ci
script:
- npm run protractor-ci
```
It will use `node-protractor:latest` docker image to run tests. We enable caching of `node_modules` folder to avoid reinstalling modules between tests executions. In this configuration we create two tasks `unit_tests` and `e2e_tests` that will be run separately.
\ No newline at end of file
Clone repository
  • A sample project
  • Build docker image
  • Configure GitLab CI
  • Configure e2e tests for gitlab runner
  • Configure e2e tests on local machine
  • Configure unit tests on local machine
  • Confirure unit tests for gitlab runner
  • Register gitlab runner
  • What is Continuous Integration
  • Home