Skip to content
Open
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
31 changes: 23 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ on:
- master
- renovate/**
pull_request:
types: [ assigned, opened, synchronize, reopened ]
types: [assigned, opened, synchronize, reopened]
jobs:
build:
name: Build
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [ 22.x ]
node-version: [22.x]

steps:
- name: Checkout
Expand Down Expand Up @@ -48,13 +48,13 @@ jobs:
path: dist/apps/package.tgz

e2e:
name: "E2E local: (${{ matrix.os }})"
name: 'E2E local: (${{ matrix.os }})'
needs: build
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
node-version: [ 22.x ]
os: [ubuntu-latest, macos-latest, windows-latest]
node-version: [22.x]

steps:
- name: Checkout
Expand All @@ -69,10 +69,15 @@ jobs:
with:
name: package.tgz

- name: Test
- name: set yarn to PATH
shell: bash
run: echo $(yarn global bin) >> $GITHUB_PATH

- name: Test (1/2)
shell: bash
run: |
cd ./examples
yarn global add json && export PATH="$(yarn global bin):$PATH"
yarn global add json
yarn cache clean && yarn add $GITHUB_WORKSPACE/package.tgz
npm run oa version
npm run oa completion
Expand All @@ -84,7 +89,16 @@ jobs:
(npm run oa version-manager set 6.0 && npm run oa version | grep -q '6.0.1') || exit 1
(npm run oa version-manager set 4.3.1 && npm run oa version | grep -q '4.3.1') || exit 1
(npm run oa version-manager set 4.3.1 && npm run oa version | grep -q '4.3.1') || exit 1
(export OPENAPI_GENERATOR_CLI_SEARCH_URL=DEFAULT && npm run oa version-manager set 7.2.0 && npm run oa version | grep -q '7.2.0') || exit 1

- name: set environment variable
shell: bash
run: echo "OPENAPI_GENERATOR_CLI_SEARCH_URL=DEFAULT" >> $GITHUB_ENV

- name: Test (2/2)
shell: bash
run: |
cd ./examples
(npm run oa version-manager set 7.2.0 && npm run oa version | grep -q '7.2.0') || exit 1
json -I -f openapitools.json -e 'this["generator-cli"]["storageDir"]="./my/storage/"'
(npm run oa version-manager set 4.3.0 && npm run oa version | grep -q '4.3.0') || exit 1
test -f ./my/storage/4.3.0.jar || exit 1
Expand All @@ -99,6 +113,7 @@ jobs:
# yarn cache clean && yarn add $GITHUB_WORKSPACE/package.tgz
# export HTTP_PROXY=http://proxy_ip:proxy_port
# npm run oa generate -- -g ruby -i https://raw.githubusercontent.com/OpenAPITools/openapi-generator/master/modules/openapi-generator/src/test/resources/3_0/petstore.yaml -o $GITHUB_WORKSPACE/tmp/ruby-client

# rel#ease:
# if: github.event.pull_request.merged == 'true'
# name: Release (Dry)
Expand Down
3 changes: 1 addition & 2 deletions apps/generator-cli/src/app/services/config.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import { Command } from 'commander';

@Injectable()
export class ConfigService {
public readonly cwd =
process.env.PWD || process.env.INIT_CWD || process.cwd();
public readonly cwd = process.cwd();
public readonly configFile = this.configFileOrDefault();

private configFileOrDefault() {
Expand Down