mirror of
https://github.com/garronej/ts-ci.git
synced 2025-11-30 21:43:05 +00:00
Commit to using only yarn
This commit is contained in:
parent
fe7c64db2c
commit
5b3860719a
2 changed files with 8 additions and 27 deletions
33
.github/workflows/ci.yaml
vendored
33
.github/workflows/ci.yaml
vendored
|
|
@ -16,14 +16,10 @@ jobs:
|
|||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-node@v3
|
||||
- uses: bahmutov/npm-install@v1
|
||||
- name: If this step fails run 'npm run lint' and 'npm run format' then commit again.
|
||||
- name: If this step fails run 'yarn lint' and 'yarn format' then commit again.
|
||||
run: |
|
||||
PACKAGE_MANAGER=npm
|
||||
if [ -f "./yarn.lock" ]; then
|
||||
PACKAGE_MANAGER=yarn
|
||||
fi
|
||||
$PACKAGE_MANAGER run lint:check
|
||||
$PACKAGE_MANAGER run format:check
|
||||
yarn lint:check
|
||||
yarn format:check
|
||||
test:
|
||||
runs-on: ${{ matrix.os }}
|
||||
needs: test_lint
|
||||
|
|
@ -33,24 +29,14 @@ jobs:
|
|||
os: [ windows-latest, ubuntu-latest ]
|
||||
name: Test with Node v${{ matrix.node }} on ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Tell if project is using npm or yarn
|
||||
id: step1
|
||||
uses: garronej/ts-ci@v2.0.2
|
||||
with:
|
||||
action_name: tell_if_project_uses_npm_or_yarn
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: ${{ matrix.node }}
|
||||
- uses: bahmutov/npm-install@v1
|
||||
- if: steps.step1.outputs.npm_or_yarn == 'yarn'
|
||||
run: |
|
||||
yarn build
|
||||
yarn test
|
||||
- if: steps.step1.outputs.npm_or_yarn == 'npm'
|
||||
run: |
|
||||
npm run build
|
||||
npm test
|
||||
- run: yarn build
|
||||
- run: yarn test
|
||||
|
||||
check_if_version_upgraded:
|
||||
name: Check if version upgrade
|
||||
# We run this only if it's a push on the default branch or if it's a PR from a
|
||||
|
|
@ -110,12 +96,7 @@ jobs:
|
|||
with:
|
||||
registry-url: https://registry.npmjs.org/
|
||||
- uses: bahmutov/npm-install@v1
|
||||
- run: |
|
||||
PACKAGE_MANAGER=npm
|
||||
if [ -f "./yarn.lock" ]; then
|
||||
PACKAGE_MANAGER=yarn
|
||||
fi
|
||||
$PACKAGE_MANAGER run build
|
||||
- run: yarn build
|
||||
- run: npx -y -p denoify@1.2.2 enable_short_npm_import_path
|
||||
env:
|
||||
DRY_RUN: "0"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue