Merge pull request #55 from aerospike/use-matrix-os #392
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: Test | |
on: | |
push: | |
branches: ["*"] | |
pull_request: | |
branches: [main] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Get go version from go.mod | |
run: | | |
echo "GO_VERSION=$(grep '^go ' go.mod | cut -d " " -f 2)" >> $GITHUB_ENV | |
- name: Setup go version | |
uses: actions/setup-go@v4 | |
with: | |
go-version-file: go.mod | |
- name: Write feature keys | |
run: | | |
echo "$FEATURESV1" > /tmp/featuresv1.conf | |
echo "$FEATURESV2" > /tmp/featuresv2.conf | |
env: | |
FEATURESV1 : ${{secrets.FEATURES_V1}} | |
FEATURESV2 : ${{secrets.FEATURES_V2}} | |
- name: Run tests | |
run: | | |
make coverage | |
env: | |
FEATKEY_DIR : /tmp | |
ASC_DOCKER_USER : ${{secrets.DOCKER_USER}} | |
ASC_DOCKER_PASS : ${{secrets.DOCKER_PASS}} | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{secrets.CODECOV_TOKEN}} | |
files: testdata/coverage/total.cov | |
verbose: false |