name: gas-oracle unit tests

on:
  push:
    paths:
      - 'go/gas-oracle/**'
    branches:
      - 'master'
      - 'develop'
      - '*rc'
      - 'regenesis/*'
  pull_request:
    paths:
      - 'go/gas-oracle/**'
    branches:
      - 'master'
      - 'develop'
      - '*rc'
      - 'regenesis/*'
  workflow_dispatch:

defaults:
  run:
    working-directory: ./go/gas-oracle

jobs:
  tests:
    runs-on: ubuntu-latest

    steps:
    - name: Install Go
      uses: actions/setup-go@v2
      with:
        go-version: 1.16.x

    - name: Checkout code
      uses: actions/checkout@v2

    - name: Install
      run: make

    - name: Test
      run: make test
