name: Setup

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

jobs:
  linux:
    strategy:
      matrix:
        container: [ubuntu, archlinux/base]
      fail-fast: false
    
    runs-on: ubuntu-latest
    name: Test on ${{ matrix.container }}
    container: ${{ matrix.container }}

    steps:
      - name: Install required packages (apt)
        if: matrix.container == 'ubuntu'
        run: |
          apt-get update
          apt-get install -y git sudo build-essential
      
      - name: Install required packages (pacman)
        if: matrix.container == 'archlinux/base'
        run: |
          pacman -Syu --noconfirm --needed git sudo make pkgconf
      
      - uses: actions/checkout@v2

      # Error check
      - name: Install dotfiles
        run: make deploy
        env:
          TERM: xterm
          DOTPATH: ${GITHUB_WORKSPACE}
  
  # darwin:
  #   runs-on: macos-latest

  # centos:
  #   runs-on: ubuntu-latest
  #   container: centos:latest
  #   steps:
  #     - uses: actions/checkout@v2

  #     - name: Install required packages
  #       run: yum install -y git sudo
  
  #     - name: Install dotfiles
  #       run: .bin/install.sh install

name: Setup

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

jobs:
  linux:
    strategy:
      matrix:
        container: [ubuntu, archlinux/base]
      fail-fast: false
    
    runs-on: ubuntu-latest
    name: Test on ${{ matrix.container }}
    container: ${{ matrix.container }}

    steps:
      - name: Install required packages (apt)
        if: matrix.container == 'ubuntu'
        run: |
          apt-get update
          apt-get install -y git sudo build-essential
      
      - name: Install required packages (pacman)
        if: matrix.container == 'archlinux/base'
        run: |
          pacman -Syu --noconfirm --needed git sudo make which pkgconf
      
      - uses: actions/checkout@v2

      # Error check
      - name: Install dotfiles
        run: make deploy
        env:
          TERM: xterm
          DOTPATH: ${GITHUB_WORKSPACE}
  
  # darwin:
  #   runs-on: macos-latest

  # centos:
  #   runs-on: ubuntu-latest
  #   container: centos:latest
  #   steps:
  #     - uses: actions/checkout@v2

  #     - name: Install required packages
  #       run: yum install -y git sudo
  
  #     - name: Install dotfiles
  #       run: .bin/install.sh install

Add which command in Arch Linux
:green_apple: Add which command in Arch Linux
