name: Arduino Library CI

on: 
  push:
    paths-ignore:
      - '**/**.md'
      - '/keywords.txt'
      - '/library.json'
      - '/library.properties'
      - '/ui'
      - '/docs'
  pull_request:
    paths-ignore:
      - '**/**.md'
      - '/keywords.txt'
      - '/library.json'
      - '/library.properties'
      - '/ui'
      - '/docs'

jobs:
  build:
    runs-on: ubuntu-latest
    
    steps:
      - uses: actions/setup-python@v1
        with:
          python-version: '3.x'
      
      - uses: actions/checkout@v2

      - uses: actions/checkout@v2
        with:
           repository: adafruit/ci-arduino
           path: ci

      - name: pre-install
        run: bash ci/actions_install.sh
        
      - name: install-deps
        run: bash .github/scripts/dep-install.sh

      - name: test platforms
        run: python3 ci/build_platform.py esp8266 esp32
