block-sdk/.github/workflows/test.yml
dependabot[bot] 0b36a2a2d0
chore(deps): bump actions/checkout from 3 to 4 (#41)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-07 11:27:40 -04:00

69 lines
1.7 KiB
YAML

name: Tests / Code Coverage
on:
pull_request:
merge_group:
push:
branches:
- main
permissions:
contents: read
concurrency:
group: ci-${{ github.ref }}-tests
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: 1.20.2
cache: true
cache-dependency-path: go.sum
- uses: technote-space/get-diff-action@v6.1.2
id: git_diff
with:
PATTERNS: |
**/*.go
go.mod
go.sum
- name: Unit Tests
if: env.GIT_DIFF
run: |
make test
# TODO: Add this back once we have a working version of v0.50.0 with ITS and v0.47.x
# test-integration:
# runs-on: ubuntu-latest
# timeout-minutes: 25
# steps:
# - uses: actions/checkout@v4
# - uses: technote-space/get-diff-action@v6.1.2
# with:
# PATTERNS: |
# **/**.go
# go.mod
# go.sum
# - uses: actions/setup-go@v4
# if: env.GIT_DIFF
# with:
# go-version: "1.20"
# cache: true
# # In this step, this action saves a list of existing images, the cache is
# # created without them in the post run. It also restores the cache if it
# # exists.
# - name: cache docker layer
# uses: satackey/action-docker-layer-caching@v0.0.11
# if: env.GIT_DIFF
# # Ignore the failure of a step and avoid terminating the job.
# continue-on-error: true
# - name: Integration Tests
# if: env.GIT_DIFF
# run: |
# make test-integration