Skip to content

Commit

Permalink
ci: GitHub Actions upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
mrdrivingduck committed Mar 10, 2024
1 parent a5cd81b commit 48b4aa3
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 37 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/docs-format-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: docs format check
on:
# trigger deployment on every PR to branch POLARDB_11_DEV in docs/
pull_request:
branches: [POLARDB_11_DEV]
branches: [ POLARDB_11_DEV ]
paths:
- ".github/workflows/docs.yml"
- "docs/**"
Expand All @@ -16,20 +16,20 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
# fetch all commits to get last updated time or other git log info
fetch-depth: 0

- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
# choose node.js version to use
node-version: "16"

# cache node_modules
- name: Cache dependencies
uses: actions/cache@v3
uses: actions/cache@v4
id: yarn-cache
with:
path: |
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,20 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
# fetch all commits to get last updated time or other git log info
fetch-depth: 0

- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
# choose node.js version to use
node-version: "16"

# cache node_modules
- name: Cache dependencies
uses: actions/cache@v3
uses: actions/cache@v4
id: yarn-cache
with:
path: |
Expand All @@ -50,7 +50,7 @@ jobs:
# please check out the docs of the workflow for more details
# @see https://github.com/crazy-max/ghaction-github-pages
- name: Deploy to GitHub Pages
uses: crazy-max/ghaction-github-pages@v3
uses: crazy-max/ghaction-github-pages@v4
with:
# deploy to gh-pages branch
target_branch: gh-pages
Expand Down
72 changes: 43 additions & 29 deletions .github/workflows/regression-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,16 @@ on:
workflow_dispatch:

jobs:
build:
build_normal:
runs-on: ubuntu-latest
strategy:
matrix:
container_image: [ centos7 ]
instance_type: [ oltp, htap, dma ]

container_image: [ centos7, ubuntu20.04, ubuntu22.04 ]
instance_type: [ oltp, htap ]
steps:
-
name: Fetch PolarDB source code
uses: actions/checkout@v3

-
name: Create and start the container
- name: Fetch PolarDB source code
uses: actions/checkout@v4
- name: Create and start the container
run: |
docker create \
-t \
Expand All @@ -47,63 +43,81 @@ jobs:
polardb/polardb_pg_devel:${{ matrix.container_image }} \
bash && \
docker start polardb_${{ matrix.container_image }}
-
name: Change ownership of the source code
- name: Change ownership of the source code
run: |
docker exec \
polardb_${{ matrix.container_image }} \
bash -c "cd /home/postgres/PolarDB-for-PostgreSQL && \
sudo chown -R postgres:postgres ./"
-
name: Ignore some test cases for OLTP regression testing
- name: Ignore some test cases for OLTP regression testing
if: ${{ matrix.instance_type == 'oltp' }}
run: |
docker exec \
polardb_${{ matrix.container_image }} \
bash -c "cd /home/postgres/PolarDB-for-PostgreSQL"
-
name: Build and run OLTP regression testing
- name: Build and run OLTP regression testing
if: ${{ matrix.instance_type == 'oltp' }}
run: |
docker exec \
polardb_${{ matrix.container_image }} \
bash -c "cd /home/postgres/PolarDB-for-PostgreSQL && \
source /etc/bashrc && \
if [ -f /etc/bashrc ]; then source /etc/bashrc; fi && \
./polardb_build.sh --withrep -r -e -r-external \
-r-contrib -r-pl --with-tde"
-
name: Ignore some test cases for HTAP regression testing
- name: Ignore some test cases for HTAP regression testing
if: ${{ matrix.instance_type == 'htap' }}
run: |
docker exec \
polardb_${{ matrix.container_image }} \
bash -c "cd /home/postgres/PolarDB-for-PostgreSQL && \
sed -i 's/test: polar-px-dev\/polar_partition_huge/#&/g' src/test/regress/polar-px-dev-schedule"
-
name: Build and run HTAP regression testing
- name: Build and run HTAP regression testing
if: ${{ matrix.instance_type == 'htap' }}
run: |
docker exec \
polardb_${{ matrix.container_image }} \
bash -c "cd /home/postgres/PolarDB-for-PostgreSQL && \
source /etc/bashrc && \
if [ -f /etc/bashrc ]; then source /etc/bashrc; fi && \
./polardb_build.sh -r-px -e -r-external \
-r-contrib -r-pl --with-tde"
- name: Change ownership of the source code
run: |
sudo chown -R runner:runner `pwd`
build_dma:
runs-on: ubuntu-latest
strategy:
matrix:
container_image: [ centos7 ]
instance_type: [ dma ]
steps:
- name: Fetch PolarDB source code
uses: actions/checkout@v4

-
name: Build and run DMA regression testing
- name: Create and start the container
run: |
docker create \
-t \
--name polardb_${{ matrix.container_image }} \
-v `pwd`:/home/postgres/PolarDB-for-PostgreSQL \
polardb/polardb_pg_devel:${{ matrix.container_image }} \
bash && \
docker start polardb_${{ matrix.container_image }}
- name: Change ownership of the source code
run: |
docker exec \
polardb_${{ matrix.container_image }} \
bash -c "cd /home/postgres/PolarDB-for-PostgreSQL && \
sudo chown -R postgres:postgres ./"
- name: Build and run DMA regression testing
if: ${{ matrix.instance_type == 'dma' }}
run: |
docker exec \
polardb_${{ matrix.container_image }} \
bash -c "cd /home/postgres/PolarDB-for-PostgreSQL && \
source /etc/bashrc && \
if [ -f /etc/bashrc ]; then source /etc/bashrc; fi && \
./polardb_build.sh -r -e -r-external \
-r-contrib -r-pl --with-tde --with-dma"
- name: Change ownership of the source code
run: |
sudo chown -R runner:runner `pwd`

0 comments on commit 48b4aa3

Please sign in to comment.