[Monorepo] - Run components unit tests #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Run unit tests | |
on: | |
pull_request: | |
push: | |
branches: | |
- master | |
env: | |
GO_VERSION: "1.19" | |
PRIORITIES": "P0" | |
jobs: | |
unit-tests: | |
strategy: | |
fail-fast: false | |
matrix: | |
component: | |
- datacatalog | |
- flyteadmin | |
- flytecopilot | |
- flyteplugins | |
- flytepropeller | |
- flytestdlib | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ${{ matrix.component }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
- name: Unit Tests | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: make install && make test_unit_codecov | |
# TODO(monorepo): investigate how codecoverage is aggregated | |
- name: Push CodeCov | |
uses: codecov/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
file: coverage.txt | |
flags: unittests | |
fail_ci_if_error: false |