kitsune/.circleci/config.yml

44 строки
1.3 KiB
YAML

version: 2.1
jobs:
lint:
docker:
- image: cimg/python:3.11
steps:
- checkout
- run:
name: Lint with pre-commit
command: |
pip install --upgrade pre-commit==3.6.0
pre-commit run --all-files
test-and-build:
docker:
- image: cimg/python:3.11
steps:
- checkout
- setup_remote_docker:
docker_layer_caching: true
- run:
name: Build test image
command: |
cp .env-build .env
./bin/dc_ci.sh build --progress=plain test
- run:
# copy synonym files to elasticsearch7 container, since circleci doesn't support volume mounts:
# https://circleci.com/docs/2.0/building-docker-images/#mounting-folders
name: Copy synonym files to elasticsearch
command: |
./bin/dc_ci.sh up -d elasticsearch
docker cp ./kitsune/search/dictionaries/synonyms/. project-elasticsearch-1:/usr/share/elasticsearch/config/synonyms
- run:
name: Run unit tests
command: ./bin/dc_ci.sh run test ./bin/run-unit-tests.sh
- run:
name: Run js tests
command: ./bin/dc_ci.sh run test npm run webpack:test
workflows:
version: 2
lint-test-build:
jobs:
- lint
- test-and-build