From ed67721c07e002f8d5f2b1d057040727f7025c31 Mon Sep 17 00:00:00 2001 From: Emmanuel Arturo Date: Sat, 4 Oct 2025 14:46:43 +0800 Subject: [PATCH 1/2] ci: add semantic release --- .github/workflows/semantic-release.yml | 41 ++++++++++++++++++++++++++ .releaserc.yml | 26 ++++++++++++++++ 2 files changed, 67 insertions(+) create mode 100644 .github/workflows/semantic-release.yml create mode 100644 .releaserc.yml diff --git a/.github/workflows/semantic-release.yml b/.github/workflows/semantic-release.yml new file mode 100644 index 0000000..3581d7c --- /dev/null +++ b/.github/workflows/semantic-release.yml @@ -0,0 +1,41 @@ +name: Semantic Releases + +on: + workflow_dispatch: + +permissions: + contents: write + pull-requests: write + issues: write + packages: write + statuses: write + +jobs: + run: + runs-on: ubuntu-latest + steps: + - name: Checkout Code + uses: actions/checkout@v4 + with: + persist-credentials: false + + - name: Setup Configuration + run: | + if [ -n "$GH_TOKEN_SECRET" ]; then + echo "GH_TOKEN=$GH_TOKEN_SECRET" >> $GITHUB_ENV + else + echo "GH_TOKEN=$GITHUB_TOKEN" >> $GITHUB_ENV + fi + env: + GH_TOKEN_SECRET: ${{ secrets.GH_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: 'lts/*' + + - name: Semantic Release + uses: cycjimmy/semantic-release-action@9cc899c47e6841430bbaedb43de1560a568dfd16 + env: + GH_TOKEN: ${{ secrets.GH_TOKEN }} diff --git a/.releaserc.yml b/.releaserc.yml new file mode 100644 index 0000000..e96c554 --- /dev/null +++ b/.releaserc.yml @@ -0,0 +1,26 @@ +{ + "branches": [ + "main", + "master", + "*.x" + ], + "plugins": [ + "@semantic-release/commit-analyzer", + "@semantic-release/release-notes-generator", + [ + "@semantic-release/changelog", + { + "changelogFile": "CHANGELOG.md" + } + ], + [ + "@semantic-release/git", + { + "assets": [ + "CHANGELOG.md" + ] + } + ], + "@semantic-release/github" + ] +} From 688dc6bd247253666d270a059d5ba71b0997219d Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Sat, 4 Oct 2025 06:48:00 +0000 Subject: [PATCH 2/2] fix(cs): [ci-review] pint :bug: --- tests/Feature/SQLLoaderTest.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/Feature/SQLLoaderTest.php b/tests/Feature/SQLLoaderTest.php index e2338f9..437bba6 100644 --- a/tests/Feature/SQLLoaderTest.php +++ b/tests/Feature/SQLLoaderTest.php @@ -126,7 +126,7 @@ test('it can detect FILLER and DATE columns', function () { Process::fake(); - $loader = new SQLLoader(); + $loader = new SQLLoader; $loader->inFile(__DIR__.'/../data/filler.dat') ->as('users.ctl') ->withHeaders() @@ -151,7 +151,7 @@ test('it can detect BOOLEAN columns and set the default value if empty', function () { Process::fake(); - $loader = new SQLLoader(); + $loader = new SQLLoader; $loader->inFile(__DIR__.'/../data/filler.dat') ->as('users.ctl') ->withHeaders() @@ -171,7 +171,7 @@ test('it can detect BOOLEAN columns and set the default value to 0 if no default was defined', function () { Process::fake(); - $loader = new SQLLoader(); + $loader = new SQLLoader; $loader->inFile(__DIR__.'/../data/filler.dat') ->as('users.ctl') ->withHeaders() @@ -191,7 +191,7 @@ test('it accepts withHeader on input file with wildcard', function () { Process::fake(); - $loader = new SQLLoader(); + $loader = new SQLLoader; $path = __DIR__.'/../data/wildcard/*.dat'; $loader->inFile($path) ->as('users.ctl') @@ -215,7 +215,7 @@ test('it can set the default date format', function () { Process::fake(); - $loader = new SQLLoader(); + $loader = new SQLLoader; $loader->inFile(__DIR__.'/../data/filler.dat') ->as('users.ctl') ->dateFormat('YYYY-MM-DD') @@ -235,7 +235,7 @@ test('it can process constants columns', function () { Process::fake(); - $loader = new SQLLoader(); + $loader = new SQLLoader; $loader->inFile(__DIR__.'/../data/users.dat') ->as('users.ctl') ->withHeaders() @@ -262,7 +262,7 @@ test('it can set input file os file proc clause', function () { Process::fake(); - $loader = new SQLLoader(); + $loader = new SQLLoader; $loader->inFile(__DIR__.'/../data/users.dat', osFileProcClause: 'os file proc') ->as('users.ctl') ->withHeaders()