[do not merge] test workflow #3
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: Build and test TEST PR | |
on: | |
pull_request: | |
jobs: | |
start-vm: | |
if: github.event.pull_request.head.repo.full_name == github.repository | |
name: Start VM | |
runs-on: ubuntu-latest | |
outputs: | |
label: ${{ steps.start-yc-runner.outputs.label }} | |
instance-id: ${{ steps.start-yc-runner.outputs.instance-id }} | |
steps: | |
- name: Start YC runner | |
id: start-yc-runner | |
uses: yc-actions/yc-github-runner@v1 | |
with: | |
mode: start | |
yc-sa-json-credentials: ${{ secrets.YC_SA_JSON_CREDENTIALS }} | |
github-token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }} | |
folder-id: ${{ vars.YC_FOLDER_ID }} | |
image-id: ${{ vars.YC_DEFAULT_IMAGE_ID }} | |
zone-id: ${{ vars.YC_ZONE_ID }} | |
subnet-id: ${{ vars.YC_SUBNET_ID }} | |
cores: 4 | |
memory: 8GB | |
core-fraction: 100 | |
disk-type: network-ssd-nonreplicated | |
disk-size: 93GB | |
checkout: | |
name: Checkout sources | |
needs: start-vm | |
runs-on: ${{ needs.start-vm.outputs.label }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
check: | |
name: Run checks | |
needs: | |
- start-vm | |
- checkout | |
runs-on: ${{ needs.start-vm.outputs.label }} | |
env: | |
HOME: /root | |
steps: | |
- name: Set up Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: 1.19 | |
- name: Set up Helm | |
uses: azure/setup-helm@v1 | |
with: | |
version: v3.11.2 | |
- name: Build | |
shell: bash | |
run: | | |
make build | |
- name: Run tests | |
shell: bash | |
run: | | |
[ $(uname -m) = x86_64 ] && curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.19.0/kind-linux-amd64 | |
chmod +x ./kind | |
sudo mv ./kind /usr/local/bin/kind | |
kind create cluster --retain -v 100 | |
kubectl get pod | |
kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.11.0/cert-manager.yaml | |
make helm-kind-install | |
docker pull ytsaurus/ytsaurus-nightly:dev-23.1-5f8638fc66f6e59c7a06708ed508804986a6579f | |
kind load docker-image ytsaurus/ytsaurus-nightly:dev-23.1-5f8638fc66f6e59c7a06708ed508804986a6579f | |
docker pull ytsaurus/ytsaurus-nightly:dev-23.1-9779e0140ff73f5a786bd5362313ef9a74fcd0de | |
kind load docker-image ytsaurus/ytsaurus-nightly:dev-23.1-9779e0140ff73f5a786bd5362313ef9a74fcd0de | |
docker pull ytsaurus/ytsaurus-nightly:dev-23.2-62a472c4efc2c8395d125a13ca0216720e06999d | |
kind load docker-image ytsaurus/ytsaurus-nightly:dev-23.2-62a472c4efc2c8395d125a13ca0216720e06999d | |
YTSAURUS_ENABLE_E2E_TESTS=true make test | |
helm uninstall ytsaurus | |
./compat_test.sh --from-version 0.4.1 --to-version trunk | |
stop-vm: | |
name: Stop VM | |
needs: | |
- start-vm | |
- check | |
runs-on: ubuntu-latest | |
if: ${{ always() }} | |
steps: | |
- name: Stop YC runner | |
uses: yc-actions/yc-github-runner@v1 | |
with: | |
mode: stop | |
yc-sa-json-credentials: ${{ secrets.YC_SA_JSON_CREDENTIALS }} | |
github-token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }} | |
label: ${{ needs.start-vm.outputs.label }} | |
instance-id: ${{ needs.start-vm.outputs.instance-id }} |