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

jobs:
  unit_test:
    runs-on: ubuntu-20.04
    steps:
      - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
      - uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568
        with:
          go-version: ${{env.GO_VERSION}}
          cache: true
          cache-dependency-path: ./go.sum
      - 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
