# Golang CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-go/ for more details
version: 2
jobs:
  machinery:
    docker:
      - image: kerberos/base:0a50dc9
    working_directory: /go/src/github.com/{{ORG_NAME}}/{{REPO_NAME}}
    steps:
      - checkout
      - run: apt-get update && apt-get install -y --no-install-recommends libavcodec-dev libavformat-dev libswscale-dev libjpeg62-turbo-dev
      - run: cd machinery && go mod download
      - run: cd machinery && go test -v ./...
      - run: cd machinery && go vet

  ui:
    docker:
      - image: cimg/python:3.9.13-node
    steps:
      - checkout
      - run: node --version
      - run: cd ui && yarn
      - run: cd ui && yarn test --passWithNoTests
      - run: cd ui && yarn build

workflows:
  version: 2
  build:
    jobs:
      - machinery
      - ui
