mirror of
https://github.com/open-telemetry/opentelemetry-go.git
synced 2025-02-15 13:53:24 +02:00
Bumps [actions/cache](https://github.com/actions/cache) from v2 to v2.1.4. - [Release notes](https://github.com/actions/cache/releases) - [Commits](https://github.com/actions/cache/compare/v2...26968a09c0ea4f3e233fdddbafd1166051a095f6) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
51 lines
1.3 KiB
YAML
51 lines
1.3 KiB
YAML
name: ci
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
env:
|
|
TEST_RESULTS: /tmp/test-results # path to where test results will be saved
|
|
jobs:
|
|
go:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
go_version: [1.14, 1.15]
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout Repo
|
|
uses: actions/checkout@v2
|
|
- name: Setup Go
|
|
uses: actions/setup-go@v2.1.3
|
|
with:
|
|
go-version: ${{ matrix.go_version }}
|
|
- name: Setup Environment
|
|
run: |
|
|
echo "GOPATH=$(go env GOPATH)" >> $GITHUB_ENV
|
|
echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
|
|
- name: restore cache
|
|
uses: actions/cache@v2.1.4
|
|
env:
|
|
cache-name: cache-go-mod
|
|
with:
|
|
path: /home/runner/go/pkg/mod
|
|
key: go-pkg-mod-{{ checksum "go.sum" }}
|
|
- name: Precommit and Coverage Report
|
|
run: |
|
|
make ci
|
|
mkdir $TEST_RESULTS
|
|
cp coverage.out $TEST_RESULTS
|
|
cp coverage.txt $TEST_RESULTS
|
|
cp coverage.html $TEST_RESULTS
|
|
- uses: codecov/codecov-action@v1
|
|
with:
|
|
file: ./coverage.txt
|
|
fail_ci_if_error: true
|
|
verbose: true
|
|
- name: store test output
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: opentelemetry-go-test-output
|
|
path: ${{ env.TEST_RESULTS }}
|