Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .github/workflows/semantic-release.yml
Original file line number Diff line number Diff line change
@@ -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 }}
26 changes: 26 additions & 0 deletions .releaserc.yml
Original file line number Diff line number Diff line change
@@ -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"
]
}
14 changes: 7 additions & 7 deletions tests/Feature/SQLLoaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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()
Expand All @@ -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()
Expand All @@ -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')
Expand All @@ -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')
Expand All @@ -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()
Expand All @@ -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()
Expand Down