version: 2
jobs:
  build:
    docker:
      - image: ubuntu
        environment:
          TERM: xterm-256color
    steps:
      - checkout
      - run:
          name: Install dependencies
          command: |
            apt -y update --fix-missing
            apt -y upgrade
            apt -y install build-essential curl git libclang-dev locales zlib1g-dev
            locale-gen en_US.UTF-8
            update-ca-certificates
      - run:
          name: Create user
          command: useradd -m tester
      - run:
          name: Copy dotfiles
          command: |
            cp -r . /home/tester/.dotfiles
            chown -R tester /home/tester/.dotfiles
      - run:
          name: Update Homebrew
          working_directory: /home/tester
          command: |
            su tester -c '. ~/.dotfiles/profile && ~/.dotfiles/local/bin/update-homebrew'
            su tester -c '. ~/.dotfiles/profile && rcup -f'
      - run:
          name: Update all
          working_directory: /home/tester
          command: su tester -c '. ~/.profile && update all -b'

version: 2
jobs:
  build:
    docker:
      - image: archlinux/base
        environment:
          TERM: xterm-256color
    steps:
      - checkout
      - run:
          name: Install dependencies
          command: |
            pacman -Syu --noconfirm base-devel clang git libnsl
            locale-gen
      - run:
          name: Set up user
          command: |
            useradd -m tester
            cp -r . /home/tester/.dotfiles
            chown -R tester /home/tester/.dotfiles
      - run:
          name: Update Homebrew
          working_directory: /home/tester
          command: |
            su tester -c '. ~/.dotfiles/profile && ~/.dotfiles/local/bin/update-homebrew'
            su tester -c '. ~/.dotfiles/profile && rcup -f'
      - run:
          name: Update all
          working_directory: /home/tester
          command: su tester -c '. ~/.profile && update all -b'

Use arch linux for CI
Use arch linux for CI
