name: Translations Validation
on:
  workflow_dispatch:
  pull_request:
    paths:
      - "translations/**"
env:
  GOPROXY: https://proxy.golang.org
  GO_VERSION: '1.19.1'
permissions:
  contents: read

jobs:
  unit_test:
    runs-on: ubuntu-20.04
    steps:
      - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
      - uses: actions/setup-go@268d8c0ca0432bb2cf416faae41297df9d262d7f
        with:
          go-version: ${{env.GO_VERSION}}
      - name: Install libvirt
        run: |
          sudo apt-get update
          sudo apt-get install -y libvirt-dev
      - name: Download Dependencies
        run: go mod download
      - name: Unit Test
        env:
          TESTSUITE: unittest
        run: make test
        continue-on-error: false
