repo: extract lib/cluster to a separate library #5967
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: Tests | |
on: | |
push: | |
branches-ignore: | |
- 'master' | |
pull_request: | |
pull_request_target: | |
types: [labeled] | |
env: | |
GO_VERSION: '>=1.21.2' | |
PYTHON_VERSION: '3.10' | |
jobs: | |
tests-ce: | |
if: | | |
(github.event_name == 'push') || | |
(github.event_name == 'pull_request' && | |
github.event.pull_request.head.repo.owner.login != 'tarantool' && | |
!contains(github.event.pull_request.labels.*.name, 'full-ci')) | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
tarantool-version: ["1.10", "2.10", "3.0"] | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@master | |
with: | |
fetch-depth: 0 | |
submodules: recursive | |
- name: Prepare CE env | |
uses: ./.github/actions/prepare-ce-test-env | |
with: | |
tarantool-version: '${{ matrix.tarantool-version }}' | |
- name: Static code check | |
uses: ./.github/actions/static-code-check | |
- name: Unit tests | |
run: mage unit | |
# This server starts and listen on 8084 port that is used for tests. | |
- name: Stop Mono server | |
run: sudo systemctl kill mono-xsp4 || true | |
- name: Integration tests | |
run: mage integration | |
tests-ee: | |
# The same as for tests-ce, but it does not run on pull requests from | |
# forks by default. Tests will run only when the pull request is labeled | |
# with `ee-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.event_name == 'push') || | |
(github.event_name == 'pull_request_target' && | |
github.event.pull_request.head.repo.owner.login != 'tarantool' && | |
!contains(github.event.pull_request.labels.*.name, 'full-ci') && | |
github.event.label.name == 'ee-ci') | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
sdk-version: ["2.10.2-0-gf4228cb7d-r508-linux-x86_64"] | |
fail-fast: false | |
steps: | |
# `ref` as merge request is needed for pull_request_target because this | |
# target runs in the context of the base commit of the pull request. | |
- uses: actions/checkout@master | |
if: github.event_name == 'pull_request_target' | |
with: | |
fetch-depth: 0 | |
submodules: recursive | |
ref: refs/pull/${{ github.event.pull_request.number }}/merge | |
- uses: actions/checkout@master | |
if: github.event_name != 'pull_request_target' | |
with: | |
fetch-depth: 0 | |
submodules: recursive | |
- name: Prepare EE env | |
uses: ./.github/actions/prepare-ee-test-env | |
with: | |
sdk-version: '${{ matrix.sdk-version }}' | |
sdk-download-token: '${{ secrets.SDK_DOWNLOAD_TOKEN }}' | |
- name: Static code check | |
uses: ./.github/actions/static-code-check | |
- name: Unit tests | |
run: mage unit | |
# This server starts and listen on 8084 port that is used for tests. | |
- name: Stop Mono server | |
run: sudo systemctl kill mono-xsp4 || true | |
- name: Integration tests | |
run: mage integration | |
tests-mac-os-ce: | |
if: | | |
(github.event_name == 'push') || | |
(github.event_name == 'pull_request' && | |
github.event.pull_request.head.repo.owner.login != 'tarantool' && | |
!contains(github.event.pull_request.labels.*.name, 'full-ci')) | |
runs-on: [self-hosted, macOS-13-self-hosted, x86_64, regular] | |
timeout-minutes: 40 | |
steps: | |
- uses: actions/checkout@master | |
with: | |
fetch-depth: 0 | |
submodules: recursive | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Install dependencies | |
run: | | |
brew install --overwrite go mage node | |
pip3 install -r test/requirements.txt | |
- name: Install etcd | |
uses: ./.github/actions/setup-etcd | |
- name: Build tt | |
env: | |
TT_CLI_BUILD_SSL: 'static' | |
run: mage build | |
- name: Install tarantool | |
run: | | |
./tt init | |
./tt -V install tarantool 2.10.7 | |
# 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: Unit tests | |
run: mage unit | |
- name: Run integration tests | |
run: mage integration |