name: Dart CI

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

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
    - name: Setup Dart SDK
      run: |
        sudo apt-get update
        sudo apt-get install apt-transport-https
        sudo sh -c 'wget -qO- https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -'
        sudo sh -c 'wget -qO- https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list > /etc/apt/sources.list.d/dart_stable.list'
        sudo apt-get update
        sudo apt-get install dart
    - uses: actions/checkout@v2
    - name: Install dependencies
      run: PATH="$PATH:/usr/lib/dart/bin" pub get
    - name: Run tests
      run: PATH="$PATH:/usr/lib/dart/bin" pub run build_runner test -- -p chrome
    - name: Install dependencies for rules builder
      run: PATH="$PATH:/usr/lib/dart/bin" pub get 
      working-directory: ./server
      if: always()
    - name: Run tests for rules builder
      run: PATH="$PATH:/usr/lib/dart/bin" pub run test test/*
      working-directory: ./server
      if: always()

name: Dart CI

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

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
    - name: Setup Dart SDK
      run: |
        sudo apt-get update
        sudo apt-get install apt-transport-https
        sudo sh -c 'wget -qO- https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -'
        sudo sh -c 'wget -qO- https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list > /etc/apt/sources.list.d/dart_stable.list'
        sudo apt-get update
        sudo apt-get install dart
    - uses: actions/checkout@v2
    - name: Install dependencies
      run: PATH="$PATH:/usr/lib/dart/bin" pub get
    - name: Run tests
      run: PATH="$PATH:/usr/lib/dart/bin" pub run build_runner test -- -p chrome
    - name: Install dependencies for rules builder
      uses: arduino/setup-protoc@v1
      run: |
        mkdir -p lib/proto
        protoc --dart_out=lib/proto/ --proto_path=../ rule.proto
        PATH="$PATH:/usr/lib/dart/bin" pub get
      working-directory: ./server
      if: always()
    - name: Run tests for rules builder
      run: PATH="$PATH:/usr/lib/dart/bin" pub run test test/*
      working-directory: ./server
      if: always()

Create the Rule protoc generated classes with Github Actions
Create the Rule protoc generated classes with Github Actions
