Skip to content

Commit

Permalink
Update github workflows
Browse files Browse the repository at this point in the history
Replace `npm ci` with `yarn install --frozen-lockfile`
Install yarn globally for cirrus
Package with python
Remove yarn upgrade step
change yarn registry
Increase timeout duration
Update yarn commands

Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
  • Loading branch information
rak-phillip committed Jul 6, 2023
1 parent 6cb11a1 commit 3c5c59d
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 19 deletions.
5 changes: 3 additions & 2 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,14 @@ task:
apt-get update
apt-get install --yes nodejs
node --version && npm --version
npm install --global yarn
# Info about Cirrus CI caching see: https://cirrus-ci.org/guide/writing-tasks/#cache-instruction
node_modules_cache:
folder: /home/ranchertest/src/node_modules
fingerprint_script: cat package-lock.json
fingerprint_script: cat yarn.lock
populate_script:
# Passing DEBUG=pw:install in order to verify if all Playwright deps were installed properly
- ${SUDO_NON_ROOT_CMD} DEBUG=pw:install npm ci
- ${SUDO_NON_ROOT_CMD} DEBUG=pw:install yarn install --frozen-lockfile
# `playwright install-deps` needs to be run as root, as it does apt-get things.
- /usr/bin/env --chdir=/home/ranchertest/src ./node_modules/.bin/playwright install-deps

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker-cli-monitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
with:
node-version: '16.x'

- run: npm ci
- run: yarn install --frozen-lockfile

- run: yarn dcmonitor
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/macM1-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
with:
go-version: '^1.18'
- name: Install dependencies
run: npm ci
run: yarn install --frozen-lockfile
#The next steps is a workaround for an unexpected failure in launching electron before running e2e tests
#Such failure is addressed in issue #2915
- name: add tools to PATH
Expand Down
12 changes: 4 additions & 8 deletions .github/workflows/package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,10 @@ jobs:
- name: Flag build for M1
if: matrix.arch == 'aarch64' && matrix.platform == 'mac'
run: echo "M1=1" >> "${GITHUB_ENV}"
- name: Upgrade npm
# We do this to avoid https://github.com/npm/cli/issues/3079
run: |
npm install -g npm@9
npm --version
- run: npm ci
# Needs a network timeout for macos & windows. See https://github.com/yarnpkg/yarn/issues/8242 for more info
- run: yarn install --frozen-lockfile --network-timeout 1000000
- run: yarn build
- run: yarn package -- --${{ matrix.platform }} --publish=never
- run: yarn package --${{ matrix.platform }} --publish=never
- name: Build bats.tar.gz
if: matrix.platform == 'linux'
run: make -C bats bats.tar.gz
Expand Down Expand Up @@ -163,7 +159,7 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: '16.x'
- run: npm ci
- run: yarn install --frozen-lockfile
- uses: actions/download-artifact@v3
if: runner.os == 'Windows'
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/rddepman.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
with:
node-version: '16.x'

- run: npm ci
- run: yarn install --frozen-lockfile

- run: yarn rddepman
env:
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,16 @@ jobs:
- uses: actions/checkout@v3
with:
persist-credentials: false
- uses: actions/setup-python@v4
with:
python-version: '3.x'
- uses: actions/setup-node@v3
with:
node-version: '16.x'
- uses: actions/setup-go@v4
with:
go-version: '^1.18'
- run: npm ci
- run: yarn install --frozen-lockfile
- run: yarn build
- run: yarn lint:nofix
- name: Install shfmt
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ucmonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
with:
node-version: '16.x'

- run: npm ci
- run: yarn install --frozen-lockfile

- run: yarn ucmonitor
env:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/upgrade-generate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ jobs:
- name: Flag build for M1
if: matrix.arch == 'aarch64' && matrix.platform == 'mac'
run: echo "M1=1" >> "${GITHUB_ENV}"
- run: npm ci
- run: yarn install --frozen-lockfile
- run: yarn build
- run: yarn package -- --${{ matrix.platform }} --publish=never
- run: yarn package --${{ matrix.platform }} --publish=never
- name: Upload Windows exe installer
if: runner.os == 'Windows'
uses: actions/upload-artifact@v3
Expand Down Expand Up @@ -87,7 +87,7 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: '16.x'
- run: npm ci
- run: yarn install --frozen-lockfile
- name: Download installer (exe)
id: exe
uses: actions/download-artifact@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
# random.
cache-dependency-path: src/go/rdctl/go.sum
- name: Install dependencies
run: npm ci
run: yarn install --frozen-lockfile
- name: Run e2e Tests
run: yarn test:e2e
env:
Expand Down

0 comments on commit 3c5c59d

Please sign in to comment.