mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-31 00:16:47 +01:00
chore: update setup-node task to activate yarn cache (#1661)
This commit is contained in:
parent
0f11a33e3a
commit
90b72f1162
31
.github/workflows/build.yaml
vendored
31
.github/workflows/build.yaml
vendored
@ -27,20 +27,19 @@ jobs:
|
|||||||
ports:
|
ports:
|
||||||
- 5432:5432
|
- 5432:5432
|
||||||
options: >-
|
options: >-
|
||||||
--health-cmd pg_isready
|
--health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
|
||||||
--health-interval 10s
|
|
||||||
--health-timeout 5s
|
|
||||||
--health-retries 5
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: Use Node.js ${{ matrix.node-version }}
|
- name: Use Node.js ${{ matrix.node-version }}
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node-version }}
|
node-version: ${{ matrix.node-version }}
|
||||||
- run: yarn
|
cache: 'yarn'
|
||||||
- run: yarn lint
|
- run: yarn
|
||||||
- run: yarn run test
|
- run: yarn lint
|
||||||
env:
|
- run: yarn run test
|
||||||
CI: true
|
env:
|
||||||
TEST_DATABASE_URL: postgres://postgres:postgres@localhost:5432/postgres
|
CI: true
|
||||||
DATABASE_URL: postgres://postgres:postgres@localhost:5432/postgres
|
TEST_DATABASE_URL: postgres://postgres:postgres@localhost:5432/postgres
|
||||||
|
DATABASE_URL: postgres://postgres:postgres@localhost:5432/postgres
|
||||||
|
63
.github/workflows/build_coverage.yaml
vendored
63
.github/workflows/build_coverage.yaml
vendored
@ -27,36 +27,35 @@ jobs:
|
|||||||
ports:
|
ports:
|
||||||
- 5432:5432
|
- 5432:5432
|
||||||
options: >-
|
options: >-
|
||||||
--health-cmd pg_isready
|
--health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
|
||||||
--health-interval 10s
|
|
||||||
--health-timeout 5s
|
|
||||||
--health-retries 5
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: Use Node.js ${{ matrix.node-version }}
|
- name: Use Node.js ${{ matrix.node-version }}
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node-version }}
|
node-version: ${{ matrix.node-version }}
|
||||||
- run: yarn
|
cache: 'yarn'
|
||||||
- run: yarn run test:coverage
|
- run: yarn
|
||||||
env:
|
- run: yarn run test:coverage
|
||||||
CI: true
|
env:
|
||||||
TEST_DATABASE_URL: postgres://postgres:postgres@localhost:5432/postgres
|
CI: true
|
||||||
DATABASE_URL: postgres://postgres:postgres@localhost:5432/postgres
|
TEST_DATABASE_URL: postgres://postgres:postgres@localhost:5432/postgres
|
||||||
#- run: |
|
DATABASE_URL: postgres://postgres:postgres@localhost:5432/postgres
|
||||||
## git config --global user.name "${GH_NAME}"
|
#- run: |
|
||||||
# git config --global user.email "${GH_EMAIL}"
|
## git config --global user.name "${GH_NAME}"
|
||||||
# GIT_USER="${GH_NAME}"
|
# git config --global user.email "${GH_EMAIL}"
|
||||||
# echo "machine github.com login ${GH_NAME} password ${GITHUB_TOKEN}" > ~/.netrc
|
# GIT_USER="${GH_NAME}"
|
||||||
#
|
# echo "machine github.com login ${GH_NAME} password ${GITHUB_TOKEN}" > ~/.netrc
|
||||||
# git add coverage
|
#
|
||||||
# git diff-index --quiet HEAD || git commit -m 'chore: update coverage reports'
|
# git add coverage
|
||||||
# git push origin main
|
# git diff-index --quiet HEAD || git commit -m 'chore: update coverage reports'
|
||||||
# env:
|
# git push origin main
|
||||||
# GH_NAME: 'ivarconr'
|
# env:
|
||||||
# GH_EMAIL: 'ivarconr@gmail.com'
|
# GH_NAME: 'ivarconr'
|
||||||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
# GH_EMAIL: 'ivarconr@gmail.com'
|
||||||
- name: Coveralls
|
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
uses: coverallsapp/github-action@master
|
- name: Coveralls
|
||||||
with:
|
uses: coverallsapp/github-action@master
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
with:
|
||||||
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
3
.github/workflows/build_prs.yaml
vendored
3
.github/workflows/build_prs.yaml
vendored
@ -5,7 +5,6 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
@ -17,7 +16,7 @@ jobs:
|
|||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node-version }}
|
node-version: ${{ matrix.node-version }}
|
||||||
|
cache: 'yarn'
|
||||||
- run: yarn
|
- run: yarn
|
||||||
- run: yarn lint
|
- run: yarn lint
|
||||||
- run: yarn build
|
- run: yarn build
|
||||||
|
|
||||||
|
7
.github/workflows/build_prs_jest_report.yaml
vendored
7
.github/workflows/build_prs_jest_report.yaml
vendored
@ -22,16 +22,15 @@ jobs:
|
|||||||
ports:
|
ports:
|
||||||
- 5432:5432
|
- 5432:5432
|
||||||
options: >-
|
options: >-
|
||||||
--health-cmd pg_isready
|
--health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
|
||||||
--health-interval 10s
|
|
||||||
--health-timeout 5s
|
|
||||||
--health-retries 5
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: Use Node.js ${{ matrix.node-version }}
|
- name: Use Node.js ${{ matrix.node-version }}
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node-version }}
|
node-version: ${{ matrix.node-version }}
|
||||||
|
cache: 'yarn'
|
||||||
- name: Tests on ${{ matrix.node-version }}
|
- name: Tests on ${{ matrix.node-version }}
|
||||||
uses: ArtiomTr/jest-coverage-report-action@v2
|
uses: ArtiomTr/jest-coverage-report-action@v2
|
||||||
with:
|
with:
|
||||||
|
28
.github/workflows/release.yaml
vendored
28
.github/workflows/release.yaml
vendored
@ -6,7 +6,6 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
@ -14,17 +13,18 @@ jobs:
|
|||||||
node-version: [14.x]
|
node-version: [14.x]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: Publish to npm
|
- name: Publish to npm
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node-version }}
|
node-version: ${{ matrix.node-version }}
|
||||||
registry-url: 'https://registry.npmjs.org'
|
registry-url: 'https://registry.npmjs.org'
|
||||||
- run: |
|
cache: 'yarn'
|
||||||
yarn install --frozen-lockfile
|
- run: |
|
||||||
- run: |
|
yarn install --frozen-lockfile
|
||||||
LATEST=$(npm show unleash-server version)
|
- run: |
|
||||||
TAG=$(node scripts/npm-tag.js $LATEST)
|
LATEST=$(npm show unleash-server version)
|
||||||
npm publish --tag ${TAG:-latest}
|
TAG=$(node scripts/npm-tag.js $LATEST)
|
||||||
env:
|
npm publish --tag ${TAG:-latest}
|
||||||
|
env:
|
||||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||||
|
Loading…
Reference in New Issue
Block a user