Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[do not merge] test workflow #73

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
103 changes: 103 additions & 0 deletions .github/workflows/check-pr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
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 }}
Loading