Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate CircleCI ci.yml workflow to GitHub Actions #476

Merged
merged 6 commits into from
Dec 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 67 additions & 0 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: build_and_test
on:
push:
branches: [master]
pull_request:
env:
TEST_RESULTS: /tmp/test-results # path to where test results will be saved
jobs:
ci:
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
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 -p $TEST_RESULTS
find . -name 'coverage.html' > "${TEST_RESULTS}/coverage.lst"
tar -n -cf - -T "${TEST_RESULTS}/coverage.lst" | tar -C "${TEST_RESULTS}" -xvf -
- 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 }}
integration:
strategy:
matrix:
target: [test-gocql, test-mongo-driver, test-gomemcache]
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v2
- run: mkdir -p $TEST_RESULTS
- name: Integration test ${{ matrix.target }}
run: |
make ${{ matrix.target }}
find . -name 'coverage.html' > "${TEST_RESULTS}/coverage.lst"
tar -n -cf - -T "${TEST_RESULTS}/coverage.lst" | tar -C "${TEST_RESULTS}" -xvf -
- name: store test output
uses: actions/upload-artifact@v2
with:
name: opentelemetry-go-contrib-test-output
path: ${{ env.TEST_RESULTS }}
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm

- Add registry link check to `Makefile` and pre-release script. (#446)
- A new AWS X-Ray ID Generator (#459)

- Migrate CircleCI jobs to GitHub Actions (#476)
### Fixed

- Fixes the body replacement in otelhttp to not to mutate a nil body. (#484)
Expand Down