Bump golang.org/x/mod from 0.14.0 to 0.22.0 #2631
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: Typescript | |
on: | |
pull_request: | |
branches: | |
- main | |
- release-* | |
- feature/* | |
push: | |
branches: | |
- main | |
- release-* | |
- feature/* | |
jobs: | |
check-typescript-changes: | |
name: Check whether tests need to be run based on diff | |
runs-on: [ubuntu-latest] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: antrea-io/has-changes@v2 | |
id: check_diff | |
with: | |
paths: plugins/grafana-custom-plugins/* | |
outputs: | |
has_changes: ${{ steps.check_diff.outputs.has_changes }} | |
test-unit: | |
needs: check-typescript-changes | |
if: ${{ needs.check-typescript-changes.outputs.has_changes == 'yes' }} | |
name: Unit test | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
node-version: [18.x] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Install Yarn | |
run: npm install -g yarn | |
# This is a known issue that hasn't been solved: https://github.com/iarna/wide-align/issues/63 | |
# Adding workaround to unblock this test: https://github.com/nrwl/nx/issues/17229 | |
- name: Remove yarn.lock and node_modules | |
run: | | |
cd plugins/grafana-custom-plugins/grafana-sankey-plugin/ | |
rm -rf yarn.lock node_modules | |
cd ../grafana-chord-plugin/ | |
rm -rf yarn.lock node_modules | |
- name: Install dependencies and run the tests | |
run: | | |
cd plugins/grafana-custom-plugins/grafana-sankey-plugin/ | |
yarn install | |
yarn test --coverage | |
cd ../grafana-chord-plugin/ | |
yarn install | |
yarn test --coverage | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
- name: Uninstall Yarn | |
if: always() | |
run: npm uninstall -g yarn |