chore: release 1.1.35 #1889
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: | |
pull_request: | |
types: [labeled] | |
repository_dispatch: | |
types: [tests] | |
env: | |
GO111MODULE: on | |
jobs: | |
unlabel: | |
name: Label taking off | |
if: github.event_name == 'pull_request' && github.event.label.name == 'run tests' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/github-script@v1 | |
with: | |
github-token: ${{secrets.GITHUB_TOKEN}} | |
script: "github.issues.removeLabel({...context.issue, name: '${{ github.event.label.name }}' })" | |
precompiled_tests_binaries: | |
name: Precompiled tests binaries | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macOS-latest, windows-latest] | |
runs-on: ${{ matrix.os }} | |
if: github.event_name == 'repository_dispatch' || (github.event_name == 'pull_request' && github.event.label.id == 1745044226) # run tests label | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version-file: go.mod | |
id: go | |
- name: Compile tests binaries | |
run: | | |
# unit tests binaries | |
./scripts/tests/precompiled_tests_binaries.sh ./cmd ./precompiled_tests_binaries/unit | |
./scripts/tests/precompiled_tests_binaries.sh ./pkg ./precompiled_tests_binaries/unit | |
# integration tests binaries | |
./scripts/tests/precompiled_tests_binaries.sh ./integration ./precompiled_tests_binaries/integration | |
# integration_k8s tests binaries | |
./scripts/tests/precompiled_tests_binaries.sh ./integration_k8s ./precompiled_tests_binaries/integration_k8s | |
shell: bash | |
- name: Compile tests werf binary (ubuntu-latest) | |
run: GOBIN=$PWD ./go-build.sh | |
if: matrix.os == 'ubuntu-latest' | |
- name: Upload unit tests binaries | |
uses: actions/upload-artifact@master | |
with: | |
name: "${{ matrix.os }}_unit_tests_binaries" | |
path: precompiled_tests_binaries/unit | |
- name: Upload integration tests binaries | |
uses: actions/upload-artifact@master | |
with: | |
name: "${{ matrix.os }}_integration_tests_binaries" | |
path: precompiled_tests_binaries/integration | |
- name: Upload integration k8s tests binaries | |
uses: actions/upload-artifact@master | |
with: | |
name: "${{ matrix.os }}_integration_k8s_tests_binaries" | |
path: precompiled_tests_binaries/integration_k8s | |
- name: Upload werf binary (ubuntu-latest) | |
uses: actions/upload-artifact@master | |
with: | |
name: "${{ matrix.os }}_werf_binary" | |
path: werf | |
if: matrix.os == 'ubuntu-latest' | |
unit_tests: | |
name: Unit tests | |
needs: precompiled_tests_binaries | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macOS-latest, windows-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version-file: go.mod | |
id: go | |
- name: Download unit tests binaries | |
uses: actions/download-artifact@master | |
with: | |
name: "${{ matrix.os }}_unit_tests_binaries" | |
path: . | |
- name: Prepare environment | |
run: find . -type f \( -name '*.test' -or -name '*.test.exe' \) -exec chmod +x {} \; | |
shell: bash | |
- name: Test | |
run: | | |
test_binaries=$(find . -type f \( -name '*.test' -or -name '*.test.exe' \)) | |
for test_binary in $test_binaries; do | |
$test_binary -test.v | |
done | |
shell: bash | |
integration_tests: | |
name: Integration tests | |
needs: precompiled_tests_binaries | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
extra-find-args: | |
- "-name 'git.test'" | |
- "-name 'ansible.test'" | |
- "! -name 'git.test' ! -name 'guides.test' ! -name 'ansible.test'" | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
if: matrix.extra-find-args != '! -name ''git.test'' ! -name ''guides.test'' ! -name ''ansible.test''' | |
- name: Checkout code (git history as fixtures for tests) | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
if: matrix.extra-find-args == '! -name ''git.test'' ! -name ''guides.test'' ! -name ''ansible.test''' | |
- name: Set up Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version-file: go.mod | |
id: go | |
- name: Download integration tests binaries | |
uses: actions/download-artifact@master | |
with: | |
name: "${{ matrix.os }}_integration_tests_binaries" | |
path: . | |
- name: Download werf binary | |
uses: actions/download-artifact@master | |
with: | |
name: "${{ matrix.os }}_werf_binary" | |
path: . | |
- name: Prepare environment | |
run: | | |
./scripts/ci/git.sh | |
go build github.com/onsi/ginkgo/ginkgo | |
chmod +x werf | |
find integration -type f -name '*.test' -exec chmod +x {} \; | |
shell: bash | |
- name: Test | |
run: | | |
test_binaries=$(find integration -type f -name '*.test' ${{ matrix.extra-find-args }}) | |
WERF_TEST_BINARY_PATH=$GITHUB_WORKSPACE/werf ./ginkgo -p -keepGoing $test_binaries | |
shell: bash | |
integration_k8s_tests: | |
name: Integration k8s tests | |
needs: precompiled_tests_binaries | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
k8s_version: [1.11, 1.12, 1.13, 1.14, 1.15, 1.16] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version-file: go.mod | |
id: go | |
- name: Download integration k8s tests binaries | |
uses: actions/download-artifact@master | |
with: | |
name: "${{ matrix.os }}_integration_k8s_tests_binaries" | |
path: . | |
- name: Download werf binary | |
uses: actions/download-artifact@master | |
with: | |
name: "${{ matrix.os }}_werf_binary" | |
path: . | |
- name: Prepare environment | |
run: | | |
./scripts/ci/git.sh | |
go build github.com/onsi/ginkgo/ginkgo | |
find integration_k8s -type f -name '*.test' -exec chmod +x {} \; | |
chmod +x werf | |
echo ::set-env name=WERF_TEST_K8S_BASE64_KUBECONFIG::$(printenv WERF_TEST_K8S_BASE64_KUBECONFIG_$(echo ${{ matrix.k8s_version }} | tr . _)) | |
shell: bash | |
env: | |
WERF_TEST_K8S_BASE64_KUBECONFIG_1_11: ${{ secrets.WERF_TEST_K8S_BASE64_KUBECONFIG_1_11 }} | |
WERF_TEST_K8S_BASE64_KUBECONFIG_1_12: ${{ secrets.WERF_TEST_K8S_BASE64_KUBECONFIG_1_12 }} | |
WERF_TEST_K8S_BASE64_KUBECONFIG_1_13: ${{ secrets.WERF_TEST_K8S_BASE64_KUBECONFIG_1_13 }} | |
WERF_TEST_K8S_BASE64_KUBECONFIG_1_14: ${{ secrets.WERF_TEST_K8S_BASE64_KUBECONFIG_1_14 }} | |
WERF_TEST_K8S_BASE64_KUBECONFIG_1_15: ${{ secrets.WERF_TEST_K8S_BASE64_KUBECONFIG_1_15 }} | |
WERF_TEST_K8S_BASE64_KUBECONFIG_1_16: ${{ secrets.WERF_TEST_K8S_BASE64_KUBECONFIG_1_16 }} | |
- name: Test | |
run: | | |
source ./scripts/ci/integration_k8s_tests_before_hook.sh | |
test_binaries=$(find integration_k8s -type f -name '*.test') | |
WERF_TEST_BINARY_PATH=$GITHUB_WORKSPACE/werf ./ginkgo -p -keepGoing $test_binaries | |
shell: bash | |
env: | |
WERF_TEST_K8S_DOCKER_REGISTRY: ${{ secrets.WERF_TEST_K8S_DOCKER_REGISTRY }} | |
WERF_TEST_K8S_DOCKER_REGISTRY_USERNAME: ${{ secrets.WERF_TEST_K8S_DOCKER_REGISTRY_USERNAME }} | |
WERF_TEST_K8S_DOCKER_REGISTRY_PASSWORD: ${{ secrets.WERF_TEST_K8S_DOCKER_REGISTRY_PASSWORD }} |