Skip to content

Commit

Permalink
Merge pull request #274 from citusdata/circleci-gha-migration
Browse files Browse the repository at this point in the history
CircleCI to Github Migration
  • Loading branch information
gokhangulbiz authored Nov 21, 2023
2 parents 783d329 + 01f083a commit 43250eb
Show file tree
Hide file tree
Showing 9 changed files with 217 additions and 155 deletions.
147 changes: 0 additions & 147 deletions .circleci/config.yml

This file was deleted.

36 changes: 36 additions & 0 deletions .github/workflows/cleanup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Cleanup Resource Group
on:
push:
branches:
- delete_resource_group/*
jobs:
delete_resource_group:
runs-on: ubuntu-latest
container:
image: buildpack-deps:bullseye
options: --user root
steps:
- uses: actions/checkout@v3.5.0
- name: Fix ownership issues
run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Install Dependencies
run: |-
apt-get update && apt-get install -y cmake zip jq
apt-get install -y ca-certificates curl apt-transport-https lsb-release gnupg
curl -sL https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor | tee /etc/apt/trusted.gpg.d/microsoft.gpg > /dev/null
AZ_REPO=$(lsb_release -cs)
echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ $AZ_REPO main" | tee /etc/apt/sources.list.d/azure-cli.list
apt-get update
apt-get install -y azure-cli
- name: Login to Azure
run: |-
az login --service-principal \
-u ${{ fromJson(secrets.AZURE_CREDENTIALS)['clientId']}} \
-p ${{ fromJson(secrets.AZURE_CREDENTIALS)['clientSecret']}} \
--tenant ${{ fromJson(secrets.AZURE_CREDENTIALS)['tenantId']}}
- name: Delete resource group
run: |-
mkdir ~/.ssh
cd ./azure
./delete-resource-group-job.sh
shell: bash
39 changes: 39 additions & 0 deletions .github/workflows/extension.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Compatibility Tests - Extension
on:
push:
branches:
- extension/*
env:
RESULT_REPO_ACCESS_TOKEN: ${{ secrets.TEST_RESULTS_REPO_TOKEN }}
jobs:
extension:
runs-on: ubuntu-latest
container:
image: buildpack-deps:bullseye
options: --user root
steps:
- uses: actions/checkout@v3.5.0
- name: Fix ownership issues
run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Install Dependencies
run: |-
apt-get update && apt-get install -y cmake zip jq
apt-get install -y ca-certificates curl apt-transport-https lsb-release gnupg
curl -sL https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor | tee /etc/apt/trusted.gpg.d/microsoft.gpg > /dev/null
AZ_REPO=$(lsb_release -cs)
echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ $AZ_REPO main" | tee /etc/apt/sources.list.d/azure-cli.list
apt-get update
apt-get install -y azure-cli
- name: Login to Azure
run: |-
az login --service-principal \
-u ${{ fromJson(secrets.AZURE_CREDENTIALS)['clientId']}} \
-p ${{ fromJson(secrets.AZURE_CREDENTIALS)['clientSecret']}} \
--tenant ${{ fromJson(secrets.AZURE_CREDENTIALS)['tenantId']}}
- name: Run extension tests
run: |-
mkdir ~/.ssh
cd ./azure
export EXTENSION_TEST=1
./citus-bot.sh citusbot_extension_test_resource_group
shell: bash
22 changes: 22 additions & 0 deletions .github/workflows/jdbc-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Compatibility Tests - JDBC
on:
push:
branches:
- jdbc/*
env:
RESULT_REPO_ACCESS_TOKEN: ${{ secrets.TEST_RESULTS_REPO_TOKEN }}
jobs:
jdbc:
runs-on: ubuntu-latest
container:
image: buildpack-deps:focal
options: --user root
steps:
- uses: actions/checkout@v3.5.0
- name: Fix ownership issues
run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Run JDBC compatibility tests
run: |-
cd ./jdbc
./run_jdbc_tests.sh
shell: bash
39 changes: 39 additions & 0 deletions .github/workflows/pgbench-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Performance Tests - PgBench
on:
push:
branches:
- pgbench/*
- all_performance_test/*
env:
RESULT_REPO_ACCESS_TOKEN: ${{ secrets.TEST_RESULTS_REPO_TOKEN }}
jobs:
pgbench:
runs-on: ubuntu-latest
container:
image: buildpack-deps:bullseye
options: --user root
steps:
- uses: actions/checkout@v3.5.0
- name: Fix ownership issues
run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Install Dependencies
run: |-
apt-get update && apt-get install -y cmake zip jq
apt-get install -y ca-certificates curl apt-transport-https lsb-release gnupg
curl -sL https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor | tee /etc/apt/trusted.gpg.d/microsoft.gpg > /dev/null
AZ_REPO=$(lsb_release -cs)
echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ $AZ_REPO main" | tee /etc/apt/sources.list.d/azure-cli.list
apt-get update
apt-get install -y azure-cli
- name: Login to Azure
run: |-
az login --service-principal \
-u ${{ fromJson(secrets.AZURE_CREDENTIALS)['clientId']}} \
-p ${{ fromJson(secrets.AZURE_CREDENTIALS)['clientSecret']}} \
--tenant ${{ fromJson(secrets.AZURE_CREDENTIALS)['tenantId']}}
- name: Run pgbench tests
run: |-
mkdir ~/.ssh
cd ./azure
./citus-bot.sh citusbot_pgbench_test_resource_group
shell: bash
39 changes: 39 additions & 0 deletions .github/workflows/scale-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Performance Tests - Scale
on:
push:
branches:
- scale/*
- all_performance_test/*
env:
RESULT_REPO_ACCESS_TOKEN: ${{ secrets.TEST_RESULTS_REPO_TOKEN }}
jobs:
scale:
runs-on: ubuntu-latest
container:
image: buildpack-deps:bullseye
options: --user root
steps:
- uses: actions/checkout@v3.5.0
- name: Fix ownership issues
run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Install Dependencies
run: |-
apt-get update && apt-get install -y cmake zip jq
apt-get install -y ca-certificates curl apt-transport-https lsb-release gnupg
curl -sL https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor | tee /etc/apt/trusted.gpg.d/microsoft.gpg > /dev/null
AZ_REPO=$(lsb_release -cs)
echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ $AZ_REPO main" | tee /etc/apt/sources.list.d/azure-cli.list
apt-get update
apt-get install -y azure-cli
- name: Login to Azure
run: |-
az login --service-principal \
-u ${{ fromJson(secrets.AZURE_CREDENTIALS)['clientId']}} \
-p ${{ fromJson(secrets.AZURE_CREDENTIALS)['clientSecret']}} \
--tenant ${{ fromJson(secrets.AZURE_CREDENTIALS)['tenantId']}}
- name: Run scale tests
run: |-
mkdir ~/.ssh
cd ./azure
./citus-bot.sh citusbot_scale_test_resource_group
shell: bash
39 changes: 39 additions & 0 deletions .github/workflows/tpch-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Performance Tests - TPCH
on:
push:
branches:
- tpch/*
- all_performance_test/*
env:
RESULT_REPO_ACCESS_TOKEN: ${{ secrets.TEST_RESULTS_REPO_TOKEN }}
jobs:
tpch:
runs-on: ubuntu-latest
container:
image: buildpack-deps:bullseye
options: --user root
steps:
- uses: actions/checkout@v3.5.0
- name: Fix ownership issues
run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Install Dependencies
run: |-
apt-get update && apt-get install -y cmake zip jq
apt-get install -y ca-certificates curl apt-transport-https lsb-release gnupg
curl -sL https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor | tee /etc/apt/trusted.gpg.d/microsoft.gpg > /dev/null
AZ_REPO=$(lsb_release -cs)
echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ $AZ_REPO main" | tee /etc/apt/sources.list.d/azure-cli.list
apt-get update
apt-get install -y azure-cli
- name: Login to Azure
run: |-
az login --service-principal \
-u ${{ fromJson(secrets.AZURE_CREDENTIALS)['clientId']}} \
-p ${{ fromJson(secrets.AZURE_CREDENTIALS)['clientSecret']}} \
--tenant ${{ fromJson(secrets.AZURE_CREDENTIALS)['tenantId']}}
- name: Run tpch tests
run: |-
mkdir ~/.ssh
cd ./azure
./citus-bot.sh citusbot_tpch_test_resource_group
shell: bash
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ If your subscriptions list doesn't contain `Azure SQL DB Project Orcas - CitusDa
ssh-add
```
5. You should setup your VPN to be able to connect to Azure VM-s if your tests are not running on CircleCI. Doing this as of latest consists of:
5. You should setup your VPN to be able to connect to Azure VM-s if your tests are not running on GHA. Doing this as of latest consists of:
* Open your VPN.
* Run `routes.ps1` (on Windows only, if you are developing on Mac you should probably ping smn from the team for help). The script requires
`python` to be installed to run.
Expand Down Expand Up @@ -360,7 +360,7 @@ be lifted in the future.
# <a name="running-tests"></a> Running Tests
## <a name="running-automated-tests"></a>Running Automated Tests
**Depending of the tests you trigger here, you can block at most 3 jobs slots in circleci for around 3 hours. Choose wisely the time you want to run the tests to not block development**
**Depending of the tests you trigger here, you can block at most 3 jobs slots in GHA for around 3 hours. Choose wisely the time you want to run the tests to not block development**
If you want, you can run trigger a job which can run pgbench, scale, tpch and extension tests. What the job does is:
Expand All @@ -377,7 +377,7 @@ There is a separate job for each test and you can run any combinations of them.
* If the branch has a prefix `all_performance_test/`, then all jobs will be triggered.
* If the branch has a prefix `extension/`, then extension job will be triggered.
You should push your branch to Github so that the circleci job will be triggerred.
You should push your branch to Github so that the GHA job will be triggerred.
Each job uses a specific resource group name so that there will be at most 3 resource groups for these jobs. If there is already a resource group, then you should make sure that:
Expand Down
Loading

0 comments on commit 43250eb

Please sign in to comment.