Skip to content

build(deps): bump golang.org/x/net from 0.28.0 to 0.29.0 (#1571) #886

build(deps): bump golang.org/x/net from 0.28.0 to 0.29.0 (#1571)

build(deps): bump golang.org/x/net from 0.28.0 to 0.29.0 (#1571) #886

name: Integration Tests
on:
workflow_dispatch: null
push:
branches:
- main
- dev
jobs:
integration_tests:
name: Run integration tests
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
user: ["USER_1", "USER_2", "USER_3", "USER_4"]
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: 'recursive'
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.x'
- name: Install Dependencies
run: |
make deps
sudo apt-get update -y
sudo apt-get install -y build-essential
- name: Install go-junit-report
run: go install github.com/jstemmer/go-junit-report/v2@latest
# Note: test tags are not in alphabetical order, it was divided to optimize test execution time
- name: Set Test Scope for each Account
run: |
case "${{ matrix.user }}" in
"USER_1")
echo "TEST_TAGS=acceptance,backup,domain,domainrecord,domains,domainzonefile,helper,instance" >> $GITHUB_ENV
echo "LINODE_TOKEN=${{ secrets.LINODE_TOKEN_USER_1 }}" >> $GITHUB_ENV
;;
"USER_2")
echo "TEST_TAGS=firewall,firewalldevice,firewalls,image,images,instancenetworking,instancesharedips,instancetype,instancetypes,ipv6range,ipv6ranges,kernel,kernels,nb,nbconfig,nbconfigs,nbnode,nbs,sshkey,sshkeys,vlan,volume,volumes,vpc,vpcs" >> $GITHUB_ENV
echo "LINODE_TOKEN=${{ secrets.LINODE_TOKEN_USER_2 }}" >> $GITHUB_ENV
;;
"USER_3")
echo "TEST_TAGS=instanceconfig,instancedisk,instanceip,networkingip,objcluster,objkey,profile,rdns,region,regions,stackscript,stackscripts" >> $GITHUB_ENV
echo "LINODE_TOKEN=${{ secrets.LINODE_TOKEN_USER_3 }}" >> $GITHUB_ENV
;;
"USER_4")
echo "TEST_TAGS=lke,lkeclusters,lkenodepool,lkeversions,obj,objbucket,placementgroup,placementgroups,placementgorupassignment,token,user,users" >> $GITHUB_ENV
echo "LINODE_TOKEN=${{ secrets.LINODE_TOKEN_USER_4 }}" >> $GITHUB_ENV
;;
esac
- name: Set report filename
run: echo "REPORT_FILENAME=$(date +'%Y%m%d%H%M')_terraform_test_report_${{ matrix.user }}.xml" >> $GITHUB_ENV
- name: Run Integration Tests
run: |
make TEST_TAGS="${{ env.TEST_TAGS }}" int-test | go-junit-report -set-exit-code -iocopy -out $REPORT_FILENAME
env:
LINODE_TOKEN: ${{ env.LINODE_TOKEN }}
- name: Upload Test Report as Artifact
if: always()
uses: actions/upload-artifact@v4
with:
name: test-report-${{ matrix.user }}
if-no-files-found: ignore
path: '*.xml'
retention-days: 1
process-upload-report:
runs-on: ubuntu-latest
needs: [integration_tests]
if: always() # Run even if previous job fails
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: 'recursive'
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install Python dependencies
run: pip3 install requests wheel boto3
- name: Download test report
uses: actions/download-artifact@v4
- name: Get .xml reports from separate Artifacts into root folder
run: rsync -av test-report-USER_*/* .
- name: Merge Test Reports
run: python e2e_scripts/tod_scripts/xml_to_obj_storage/terraform_tests/merge_terraform_results.py
- name: Add Information to XML Report
run: |
filename=$(ls | grep -E '^[0-9]{12}_terraform_merged_report.xml$')
python e2e_scripts/tod_scripts/xml_to_obj_storage/scripts/add_gha_info_to_xml.py --branch_name "${GITHUB_REF#refs/*/}" --gha_run_id "${GITHUB_RUN_ID}" --gha_run_number "${GITHUB_RUN_NUMBER}" --xmlfile "${filename}"
- name: Upload Test Results
run: |
filename=$(ls | grep -E '^[0-9]{12}_terraform_merged_report.xml$')
python e2e_scripts/tod_scripts/xml_to_obj_storage/scripts/xml_to_obj.py "${filename}"
env:
LINODE_CLI_OBJ_ACCESS_KEY: ${{ secrets.LINODE_CLI_OBJ_ACCESS_KEY }}
LINODE_CLI_OBJ_SECRET_KEY: ${{ secrets.LINODE_CLI_OBJ_SECRET_KEY }}
apply-calico-rules:
runs-on: ubuntu-latest
needs: [integration_tests]
if: always()
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: 'recursive'
- name: Download kubectl and calicoctl for LKE clusters
run: |
curl -LO "https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl"
curl -LO "https://github.com/projectcalico/calico/releases/download/v3.25.0/calicoctl-linux-amd64"
chmod +x calicoctl-linux-amd64 kubectl
mv calicoctl-linux-amd64 /usr/local/bin/calicoctl
mv kubectl /usr/local/bin/kubectl
- name: Apply Calico Rules to LKE # Only Running against Matrix USER 4 which includes LKE test suite
run: |
cd e2e_scripts/cloud_security_scripts/lke_calico_rules/ && ./lke_calico_rules_e2e.sh
env:
LINODE_TOKEN: ${{ secrets.LINODE_TOKEN_USER_4 }}