perf: add query batching (#180) (#287) #856
This file contains hidden or 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: Integration Test K8s-snap | |
on: | |
push: | |
branches: ["master"] | |
pull_request: | |
schedule: | |
- cron: "0 0 * * *" # Runs every midnight | |
permissions: | |
contents: read | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
get-e2e-tags: | |
name: Get e2e test tags | |
runs-on: ubuntu-latest | |
outputs: | |
test-tags: ${{ steps.get-e2e-tags.outputs.test-tags }} | |
steps: | |
- name: Get e2e test tags | |
id: get-e2e-tags | |
run: | | |
set -x | |
tags="up_to_weekly" | |
has_cnfc_label=${{ contains(github.event.pull_request.labels.*.name, 'cncf-conformance') }} | |
if [[ ${{ github.event_name }} == "schedule" || "$has_cnfc_label" == "true" ]]; then | |
tags+=" conformance_tests" | |
fi | |
echo "test-tags=$tags" >> "$GITHUB_OUTPUT" | |
build: | |
name: K8s-snap Integration Test | |
runs-on: self-hosted-linux-amd64-jammy-large | |
needs: [get-e2e-tags] | |
steps: | |
- name: Checking out repo | |
uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
- name: Install tox | |
run: pip install tox | |
- name: Install Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: go.mod | |
- name: Install lxd | |
uses: canonical/[email protected] | |
with: | |
bridges: "lxdbr0,dualstack-br0,ipv6-br0" | |
- name: Patch k8s snap | |
uses: ./.github/actions/patch-k8s-snap | |
- name: Running | |
env: | |
TEST_SNAP: ${{ github.workspace }}/k8s-updated.snap | |
TEST_SUBSTRATE: lxd | |
TEST_LXD_IMAGE: ubuntu:22.04 | |
TEST_INSPECTION_REPORTS_DIR: ${{ github.workspace }}/inspection-reports | |
run: | | |
git clone https://github.com/canonical/k8s-snap.git | |
cd k8s-snap/tests/integration && sg lxd -c "tox -e integration -- --tags ${{ needs.get-e2e-tags.outputs.test-tags }}" | |
- name: Prepare inspection reports | |
if: failure() | |
run: | | |
tar -czvf inspection-reports.tar.gz -C ${{ github.workspace }} inspection-reports | |
- name: Upload inspection report artifact | |
if: failure() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: inspection-reports | |
path: ${{ github.workspace }}/inspection-reports.tar.gz | |
- name: Upload CNCF conformance report artifact | |
if: ${{ failure() && contains(needs.get-e2e-tags.outputs.test-tags, 'conformance_tests') }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: sonobuoy-e2e-${{ env.artifact_name }} | |
path: k8s-snap/tests/integration/sonobuoy_e2e.tar.gz |