fix: install python dependency #125
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 unittests for go plugin | |
on: | |
push: | |
pull_request: | |
types: [synchronize] | |
jobs: | |
test: | |
strategy: | |
fail-fast: false | |
matrix: | |
go-version: | |
- 1.18.x | |
- 1.19.x | |
- 1.20.x | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Install Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- name: Install Python plugin dependencies for macos | |
if: matrix.os == 'macos-latest' | |
run: | | |
python3 -m venv .venv | |
source .venv/bin/activate | |
python3 -m pip install funppy | |
- name: Install Python plugin dependencies for linux/windows | |
if: matrix.os == 'ubuntu-latest' || matrix.os == 'windows-latest' | |
run: python3 -m pip install funppy | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Run coverage | |
run: go test -coverprofile="cover.out" -covermode=atomic -race ./... | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
name: hrp plugin # User defined upload name. Visible in Codecov UI | |
token: ${{ secrets.CODECOV_TOKEN }} # Repository upload token | |
file: ./cover.out # Path to coverage file to upload | |
flags: unittests # Flag upload to group coverage metrics | |
fail_ci_if_error: true # Specify whether or not CI build should fail if Codecov runs into an error during upload | |
verbose: true |