name: unit
on:
  pull_request:
    paths-ignore:
      - '**/*.md'
  push:
    branches:
      - 'release-*'
      - 'master'
      - 'main'
    tags:
      - 'v*'
    paths-ignore:
      - '**/*.md'
jobs:
  unit-tests:
    runs-on: ubuntu-latest
    name: Unit tests
    steps:
    - uses: actions/checkout@v4
    - name: Import environment variables from file
      run: cat ".github/env" >> $GITHUB_ENV
    - uses: actions/setup-go@v4
      with:
        go-version: '${{ env.golang-version }}'
        check-latest: true
    - run: make test-unit
  extended-tests:
    runs-on: ubuntu-latest
    name: Extended tests
    steps:
    - uses: actions/checkout@v4
    - name: Import environment variables from file
      run: cat ".github/env" >> $GITHUB_ENV
    - uses: actions/setup-go@v4
      with:
        go-version: ${{ env.golang-version }}
        check-latest: true
    - run: make test-long
