mod: bump go-openssl to v1.0.0 #93
Workflow file for this run
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: testing | |
on: | |
push: | |
pull_request: | |
pull_request_target: | |
types: [labeled] | |
workflow_dispatch: | |
jobs: | |
run-tests-ee: | |
# Does not run on pull requests from forks and on forks by default. | |
# Tests from forks will run only when the pull request is labeled with | |
# `full-ci`. To avoid security problems, the label must be reset manually | |
# for every run. | |
# | |
# We need to use `pull_request_target` because it has access to base | |
# repository secrets unlike `pull_request`. | |
if: | | |
github.repository == 'tarantool/go-tlsdialer' && | |
(github.event_name == 'push' || | |
(github.event_name == 'pull_request_target' && | |
github.event.pull_request.head.repo.full_name != github.repository && | |
github.event.label.name == 'full-ci')) || | |
github.event_name == 'workflow_dispatch' | |
runs-on: ubuntu-latest | |
env: | |
COVERAGE_FILE: 'coverage.out' | |
strategy: | |
fail-fast: false | |
matrix: | |
golang: | |
- '1.20' | |
- 'stable' | |
sdk-path: | |
- 'release/linux/x86_64/2.10/' | |
sdk-version: | |
- 'sdk-gc64-2.10.8-0-r598.linux.x86_64' | |
coveralls: [ false ] | |
include: | |
- golang: '1.20' | |
sdk-path: 'release/linux/x86_64/2.11/' | |
sdk-version: 'sdk-gc64-2.11.1-0-r598.linux.x86_64' | |
coveralls: false | |
- golang: 'stable' | |
sdk-path: 'release/linux/x86_64/2.11/' | |
sdk-version: 'sdk-gc64-2.11.1-0-r598.linux.x86_64' | |
coveralls: false | |
- golang: '1.20' | |
sdk-path: 'release/linux/x86_64/3.0/' | |
sdk-version: 'sdk-gc64-3.0.0-0-gf58f7d82a-r23.linux.x86_64' | |
coveralls: false | |
- golang: 'stable' | |
sdk-path: 'release/linux/x86_64/3.0/' | |
sdk-version: 'sdk-gc64-3.0.0-0-gf58f7d82a-r23.linux.x86_64' | |
coveralls: true | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Tarantool ${{ matrix.sdk-version }} | |
run: | | |
ARCHIVE_NAME=tarantool-enterprise-${{ matrix.sdk-version }}.tar.gz | |
curl -O -L https://${{ secrets.SDK_DOWNLOAD_TOKEN }}@download.tarantool.io/enterprise/${{ matrix.sdk-path }}${ARCHIVE_NAME} | |
tar -xzf ${ARCHIVE_NAME} | |
rm -f ${ARCHIVE_NAME} | |
- name: Setup golang for the connector and tests | |
uses: actions/setup-go@v3 | |
with: | |
go-version: ${{matrix.golang}} | |
- name: Run regression tests | |
run: | | |
source tarantool-enterprise/env.sh | |
go test -v -count=1 -shuffle=on ./... | |
go test -race -v -count=1 -shuffle=on ./... | |
- name: Run tests, collect code coverage data and send to Coveralls | |
if: ${{ matrix.coveralls }} | |
env: | |
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
source tarantool-enterprise/env.sh | |
go clean -testcache | |
go get golang.org/x/tools/cmd/cover | |
go test ./... -v -count=1 -shuffle=on -covermode=atomic -coverprofile=${COVERAGE_FILE} | |
go tool cover -func=${COVERAGE_FILE} | |
go get github.com/mattn/goveralls | |
go install github.com/mattn/goveralls | |
goveralls -coverprofile=${COVERAGE_FILE} -service=github | |
testing_mac_os: | |
# We want to run on external PRs, but not on our own internal | |
# PRs as they'll be run by the push to the branch. | |
# | |
# The main trick is described here: | |
# https://github.com/Dart-Code/Dart-Code/pull/2375 | |
if: | | |
github.repository == 'tarantool/go-tlsdialer' && | |
(github.event_name == 'push' || | |
(github.event_name == 'pull_request_target' && | |
github.event.pull_request.head.repo.full_name != github.repository && | |
github.event.label.name == 'full-ci')) || | |
github.event_name == 'workflow_dispatch' | |
strategy: | |
fail-fast: false | |
matrix: | |
golang: | |
- '1.20' | |
- 'stable' | |
runs-on: | |
- macos-11 | |
- macos-12 | |
tarantool-ee: | |
- 'gc64-2.11.2-0-r613' | |
env: | |
# Set as absolute paths to avoid any possible confusion | |
# after changing a current directory. | |
SRCDIR: ${{ format('{0}/{1}', github.workspace, github.repository) }} | |
runs-on: ${{ matrix.runs-on }} | |
steps: | |
- name: Clone the connector | |
uses: actions/checkout@v3 | |
with: | |
path: ${{ env.SRCDIR }} | |
- name: Install latest tt from brew | |
run: brew install tt | |
- name: Install tarantool | |
env: | |
TT_CLI_EE_USERNAME: ${{ secrets.TT_EE_USERNAME }} | |
TT_CLI_EE_PASSWORD: ${{ secrets.TT_EE_PASSWORD }} | |
run: | | |
tt init | |
tt -V install tarantool-ee ${{ matrix.tarantool-ee }} | |
# Delete the tt config so that it does not affect the test environment. | |
rm -f tt.yaml | |
- name: Add Tarantool to Path | |
run: | | |
echo "${GITHUB_WORKSPACE}/bin" >> $GITHUB_PATH | |
- name: Set Tarantool include directory to the environment | |
run: | | |
echo "TT_CLI_TARANTOOL_PREFIX=${GITHUB_WORKSPACE}/include/" >> $GITHUB_ENV | |
- name: Setup golang for the connector and tests | |
uses: actions/setup-go@v3 | |
with: | |
go-version: ${{ matrix.golang }} | |
# Workaround for Mac OS 12 testrace failure | |
# https://github.com/golang/go/issues/49138 | |
- name: disable MallocNanoZone for macos-12 | |
run: echo "MallocNanoZone=0" >> $GITHUB_ENV | |
if: matrix.runs-on == 'macos-12' | |
- name: Install test dependencies | |
run: | | |
brew install tt | |
- name: Run regression tests | |
run: | | |
cd "${SRCDIR}" | |
go test -v -count=1 -shuffle=on ./... | |
go test -race -v -count=1 -shuffle=on ./... |