name: Tests

on:
  push:
    branches: [ main ]
  pull_request:
    branches: [ main ]

jobs:

  tests:
    name: Test code
    runs-on: ubuntu-latest
    strategy:
      matrix:
        go:
          - ^1.13
          - ^1.14
          - ^1.15
          - ^1
    steps:

    - name: Set up Go
      uses: actions/setup-go@v2
      with:
        go-version: ${{ matrix.go }}

    - name: Check out code into the Go module directory
      uses: actions/checkout@v2
      with:
        fetch-depth: 200

    - name: Install packaging dependencies
      run: |
        sudo apt-get install libcairo2-dev mercurial pkg-config wget -y

    - name: Test
      run: |
        make test
        make
        ./e2e_test.sh

    - name: Check packaging
      if: matrix.go == 'some-build-trigger' # TODO
      env:
        BUILD_PACKAGES: true
      run: |
        wget "https://raw.githubusercontent.com/go-graphite/helper-scripts/main/travis-docker-build.sh" && chmod +x ./travis-docker-build.sh
        ./travis-docker-build.sh carbonapi

Implement the simplest testing workflow
Implement the simplest testing workflow
