tic-tac-toe-optimal-turn
Version:
Tic-tac-toe optimal turn package based on alpha-beta algorithm.
61 lines (54 loc) • 838 B
YAML
image: ${CI_REGISTRY}/${CI_IMAGE}
stages:
- install
- test
- build
- release
cache:
paths:
- node_modules/
install_dependencies:
stage: install
script:
- npm install
artifacts:
paths:
- node_modules/
only:
- main
lint_test:
stage: test
script:
- npm run lint
dependencies:
- install_dependencies
only:
- main
unit_test:
stage: test
script:
- npm run test
dependencies:
- install_dependencies
only:
- main
build:
stage: build
script:
- npm run build
dependencies:
- install_dependencies
artifacts:
paths:
- dist/
only:
- main
release:
stage: release
script:
- npm config set //registry.npmjs.org/:_authToken ${NPM_TOKEN}
- npm publish --access public
only:
- main
variables:
NPM_TOKEN: $NPM_TOKEN