|
| 1 | +name: test |
| 2 | + |
| 3 | +on: |
| 4 | + pull_request: |
| 5 | + |
| 6 | +jobs: |
| 7 | + test-matrix: |
| 8 | + strategy: |
| 9 | + matrix: |
| 10 | + operating-system: [ubuntu-latest, windows-latest, macOS-latest] |
| 11 | + |
| 12 | + runs-on: ${{ matrix.operating-system }} |
| 13 | + |
| 14 | + steps: |
| 15 | + - name: Disable EOL conversions |
| 16 | + run: git config --global core.autocrlf false |
| 17 | + |
| 18 | + - name: Checkout |
| 19 | + uses: actions/checkout@v2 |
| 20 | + |
| 21 | + - name: Install Go |
| 22 | + uses: actions/setup-go@v2 |
| 23 | + with: |
| 24 | + go-version: "1.14" |
| 25 | + |
| 26 | + - name: Install Dependencies (Linux) |
| 27 | + # run: sudo apt-get install ninja-build |
| 28 | + run: sudo apt update && sudo apt install -y --no-install-recommends build-essential libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev |
| 29 | + if: matrix.operating-system == 'ubuntu-latest' |
| 30 | + |
| 31 | + - name: Install Go deps |
| 32 | + # Since 10/23/2019 pwsh is the default shell |
| 33 | + # on Windows, but pwsh fails to install protoc-gen-go so |
| 34 | + # we force bash as default shell for all OSes in this task |
| 35 | + run: | |
| 36 | + go get github.com/golangci/govet |
| 37 | + go get golang.org/x/lint/golint |
| 38 | + shell: bash |
| 39 | + |
| 40 | + - name: Install Taskfile |
| 41 | + uses: Arduino/actions/setup-taskfile@master |
| 42 | + with: |
| 43 | + repo-token: ${{ secrets.GITHUB_TOKEN }} |
| 44 | + |
| 45 | + - name: Check the code is good |
| 46 | + run: task check |
| 47 | + |
| 48 | + - name: Build the Agent |
| 49 | + run: task build |
| 50 | + |
| 51 | + - name: Run unit tests |
| 52 | + run: task test-unit |
| 53 | + |
| 54 | + # - name: Send unit tests coverage to Codecov |
| 55 | + # if: > |
| 56 | + # matrix.operating-system == 'ubuntu-latest' && |
| 57 | + # github.event_name == 'push' |
| 58 | + # uses: codecov/codecov-action@v1 |
| 59 | + # with: |
| 60 | + # file: ./coverage_unit.txt |
| 61 | + # flags: unit |
| 62 | + |
| 63 | + # - name: Send legacy tests coverage to Codecov |
| 64 | + # if: > |
| 65 | + # matrix.operating-system == 'ubuntu-latest' && |
| 66 | + # github.event_name == 'push' |
| 67 | + # uses: codecov/codecov-action@v1 |
| 68 | + # with: |
| 69 | + # file: ./coverage_legacy.txt |
| 70 | + # flags: unit |
| 71 | + |
| 72 | + # - name: Send integration tests coverage to Codecov |
| 73 | + # if: > |
| 74 | + # matrix.operating-system == 'ubuntu-latest' && |
| 75 | + # github.event_name == 'push' |
| 76 | + # uses: codecov/codecov-action@v1 |
| 77 | + # with: |
| 78 | + # file: ./coverage_integ.txt |
| 79 | + # flags: integ |
0 commit comments