Skip to content

Commit

Permalink
Merge branch 'main' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
sayaliM0412 authored Feb 9, 2024
2 parents 0d61c94 + 180275d commit cf819fb
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 31 deletions.
32 changes: 7 additions & 25 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,25 +105,20 @@ on:
]
jobs:
check_build_safety:
name: Check if Build should be done
runs-on: ubuntu-22.04
authorize:
environment: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.full_name != github.repository && 'external' || 'internal' }}
runs-on: ubuntu-latest
steps:
- name: Emit failure code if unsafe
if: github.event.pull_request && github.event.pull_request.head.repo.full_name != 'liquibase/liquibase-test-harness'
run: |
echo "PR from Fork is NOT safe to build"
exit 1
- run: true

setup:
name: Setup
needs: check_build_safety
needs: authorize
runs-on: ubuntu-22.04
env:
GITHUB_TOKEN: ${{ secrets.INSTALL_SNAPSHOT_LIQUIBASE }}
outputs:
liquibaseOwner: ${{ steps.configure-build.outputs.liquibaseOwner }}
useLiquibaseSnapshot: ${{ steps.configure-build.outputs.useLiquibaseSnapshot }}
liquibaseBranch: ${{ steps.configure-build.outputs.liquibaseBranch }}
liquibaseRepo: ${{ steps.configure-build.outputs.liquibaseRepo }}
liquibaseSha: ${{ steps.configure-build.outputs.liquibaseSha }}
Expand Down Expand Up @@ -152,17 +147,6 @@ jobs:
console.log("Running in liquibase-test-harness branch " + testBranchName);
core.notice("Running in liquibase-test-harness branch " + testBranchName);
let useLiquibaseSnapshot = testBranchName !== "main"
if ("${{ github.event.pull_request.base.ref }}" !== "") {
useLiquibaseSnapshot = "${{ github.event.pull_request.base.ref }}" !== "main"
}
if (${{ inputs.ignoreLiquibaseSnapshot == true }}) {
useLiquibaseSnapshot = false
}
console.log("useLiquibaseSnapshot == " + useLiquibaseSnapshot);
core.setOutput("useLiquibaseSnapshot", useLiquibaseSnapshot);

console.log("liquibaseBranch == " + "${{ github.event.inputs.liquibaseBranch }}");
core.setOutput("liquibaseBranch", "${{ github.event.inputs.liquibaseBranch }}" || testBranchName+", master");
Expand Down Expand Up @@ -256,7 +240,6 @@ jobs:
cache: 'maven'

- name: Install Snapshot Liquibase
if: steps.configure-build.outputs.useLiquibaseSnapshot == 'true'
env:
GITHUB_TOKEN: ${{ secrets.INSTALL_SNAPSHOT_LIQUIBASE }}
run: |
Expand Down Expand Up @@ -301,7 +284,7 @@ jobs:

test:
runs-on: ubuntu-20.04
needs: [ setup ]
needs: [ setup, authorize ]
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -331,7 +314,6 @@ jobs:
ARTIFACTORY_TOKEN: ${{ secrets.ARTIFACTORY_TOKEN }}

- name: Configure Liquibase Version
if: needs.setup.outputs.useLiquibaseSnapshot == 'true'
env:
GITHUB_TOKEN: ${{ secrets.INSTALL_SNAPSHOT_LIQUIBASE }}
run: |
Expand All @@ -357,7 +339,7 @@ jobs:
finish:
name: Finish
runs-on: ubuntu-22.04
needs: [ setup, test ]
needs: [ setup, test, authorize ]
if: ${{ always() }}
steps:
- uses: actions/checkout@v4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"name": "booleanColumn",
"nullable": true,
"type": {
"typeName": "TINYINT"
"typeName": "BOOLEAN"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"name": "boolean_col",
"nullable": false,
"type": {
"typeName": "TINYINT"
"typeName": "BOOLEAN"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
ALTER TABLE lbcat.authors ADD booleanColumn TINYINT NULL
ALTER TABLE lbcat.authors ADD booleanColumn TINYINT(1) NULL
ALTER TABLE lbcat.authors ALTER booleanColumn SET DEFAULT 1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
CREATE TABLE lbcat.test_table (id INT NULL, bit_col BIT(1) NULL, boolean_col TINYINT NULL)
INSERT INTO lbcat.test_table (id) VALUES (1)
CREATE TABLE lbcat.test_table (id INT NULL, bit_col BIT(1) NULL, boolean_col TINYINT(1) NULL)
INSERT INTO lbcat.test_table (id) VALUES (1)
UPDATE lbcat.test_table SET bit_col = 1 WHERE bit_col IS NULL
ALTER TABLE lbcat.test_table MODIFY bit_col BIT(1) NOT NULL
UPDATE lbcat.test_table SET boolean_col = 1 WHERE boolean_col IS NULL
ALTER TABLE lbcat.test_table MODIFY boolean_col TINYINT NOT NULL
ALTER TABLE lbcat.test_table MODIFY boolean_col TINYINT(1) NOT NULL
1 change: 1 addition & 0 deletions src/test/resources/init-changelogs/aws/mysql.sql
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,6 @@ INSERT INTO `posts` VALUES ('1','1','temporibus','voluptatum','Fugit non et dolo
('4','4','itaque','deleniti','Magni nam optio id recusandae.','2010-07-28'),
('5','5','ad','similique','Rerum tempore quis ut nesciunt qui excepturi est.','2006-10-09');


--changeset liquibase:5 runAlways:true
SET GLOBAL log_bin_trust_function_creators = 1;

0 comments on commit cf819fb

Please sign in to comment.