Skip to content

Commit

Permalink
Merge pull request #74 from AthennaIO/develop
Browse files Browse the repository at this point in the history
feat(version): upgrade to v4
  • Loading branch information
jlenon7 authored Aug 11, 2023
2 parents 0855262 + 4a8c03e commit 612a3c1
Show file tree
Hide file tree
Showing 13 changed files with 1,065 additions and 631 deletions.
57 changes: 0 additions & 57 deletions .athennarc.json

This file was deleted.

12 changes: 9 additions & 3 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,27 @@ jobs:
fetch-depth: 0
- uses: actions/setup-node@v1
with:
node-version: '14.x'
node-version: '18.x'
registry-url: 'https://registry.npmjs.org'

- name: Install dependencies
run: npm install

- name: Compile code
run: sh node artisan build
run: npm run build

- name: Copy README to build
run: cp README.md build/README.md | true

- name: Copy LICENSE to build
run: cp LICENSE.md build/LICENSE.md | true

- name: Automatic GitHub Release
uses: justincy/[email protected]
id: release

- name: Publish to NPM Registry
run: npm publish --access public
run: cd build && npm publish --access public
if: steps.release.outputs.released == 'true'
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
Expand Down
19 changes: 4 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,6 @@ on:
- develop

jobs:
qodana:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: 'Qodana Scan'
uses: JetBrains/qodana-action@main
env:
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }}

linux:
runs-on: ubuntu-latest
strategy:
Expand All @@ -43,10 +32,10 @@ jobs:
run: npm run test:coverage

- name: Test code compilation
run: sh node artisan build
run: npm run build

- name: Link the package and run the CLI
run: npm link . && athenna --version
run: cd build && npm link . && athenna --version

windows:
runs-on: windows-latest
Expand All @@ -69,8 +58,8 @@ jobs:
run: npm run test:coverage

- name: Test code compilation
run: sh node artisan build
run: npm run build

- name: Link the package and run the CLI
shell: bash
run: npm link . && athenna --version
run: cd build && npm link . && athenna --version
File renamed without changes.
2 changes: 1 addition & 1 deletion bin/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Ignite } from '@athenna/core'

const ignite = await new Ignite().load(import.meta.url, {
bootLogs: false,
athennaRcPath: './.athennarc.prod.json',
athennaRcPath: 'bin/.athennarc.prod.json',
})

Config.set('app.version', `Athenna CLI v${process.env.APP_VERSION}`)
Expand Down
25 changes: 9 additions & 16 deletions bin/test.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
import { assert } from '@japa/assert'
import { Importer } from '@athenna/test'
import { specReporter } from '@japa/spec-reporter'
import { configure, processCliArgs, run } from '@japa/runner'
import { Runner, assert, specReporter } from '@athenna/test'

configure({
...processCliArgs(process.argv.slice(2)),
...{
files: ['tests/unit/**/*.test.ts', 'tests/e2e/**/*.test.ts'],
plugins: [assert()],
reporters: [specReporter()],
importer: Importer.import,
timeout: 60000,
},
})

run()
await Runner.setTsEnv()
.addPlugin(assert())
.addReporter(specReporter())
.addPath('tests/e2e/**/*.ts')
.addPath('tests/unit/**/*.ts')
.setCliArgs(process.argv.slice(2))
.setGlobalTimeout(60000)
.run()
5 changes: 5 additions & 0 deletions bin/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"extends": "../tsconfig.json",
"include": ["../**/*", "../package.json", "./.athennarc.prod.json"],
"exclude": ["../build", "../tests", "../node_modules"]
}
8 changes: 3 additions & 5 deletions node
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,17 @@
# Usage:

# ./node --version
# ./node artisan --version
# ./node bin/main.ts
# ./node bin/artisan.ts
# ./node --inspect bin/artisan.ts

# Usage with "sh" or "bash":

# sh node --version
# sh node artisan --version
# sh node bin/main.ts
# sh node bin/artisan.ts
# sh node --inspect bin/artisan.ts

# Node.js executable with all arguments required to run the application.
node="node --loader ts-node/esm --experimental-import-meta-resolve --no-warnings"
node="node --loader=ts-node/esm --experimental-import-meta-resolve --no-warnings"

# Replace the first occurrence of "artisan" with "bin/artisan.ts",
# including any preceding or following spaces.
Expand Down
Loading

0 comments on commit 612a3c1

Please sign in to comment.