Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setup yarn cache in Github Actions #502

Merged
merged 3 commits into from
Sep 26, 2023
Merged
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
14 changes: 10 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Node CI
on:
pull_request:
paths-ignore:
- "nuxt/**"
- 'nuxt/**'

jobs:
lint:
Expand All @@ -14,7 +14,9 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 14.x
- run: yarn
cache: 'yarn'
cache-dependency-path: 'yarn.lock'
- run: yarn --network-timeout 100000
- run: yarn lint
- name: Type check
run: |
Expand All @@ -41,14 +43,16 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
cache-dependency-path: 'yarn.lock'
- name: Install xvfb
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt update
sudo apt install -y xvfb graphicsmagick
npm install -g xvfb-maybe
Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
- run: yarn
- run: yarn --network-timeout 100000
- run: yarn unit
- run: yarn e2e
- name: Upload screenshots
Expand Down Expand Up @@ -78,7 +82,9 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 14.x
- run: yarn
cache: 'yarn'
cache-dependency-path: 'yarn.lock'
- run: yarn --network-timeout 100000
- name: Build Electron app
shell: bash
env:
Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/nuxt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ name: Test and Deploy Github Pages with Nuxt
on:
pull_request:
paths:
- "nuxt/**"
- ".github/workflows/*nuxt*.yml"
- 'nuxt/**'
- '.github/workflows/*nuxt*.yml'
push:
branches: master
paths:
- "nuxt/**"
- ".github/workflows/*nuxt*.yml"
- 'nuxt/**'
- '.github/workflows/*nuxt*.yml'

jobs:
test:
Expand All @@ -22,6 +22,8 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: 16.x
cache: 'yarn'
cache-dependency-path: 'nuxt/yarn.lock'
- run: yarn
- run: yarn lint
- run: yarn test
Expand All @@ -38,6 +40,8 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: 16.x
cache: 'yarn'
cache-dependency-path: 'nuxt/yarn.lock'
- name: yarn
run: yarn
- name: deploy
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/semantic-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ on:
workflow_dispatch:
inputs:
version:
description: "Exsiting version to publish files. If not provided, will create a new release."
description: 'Exsiting version to publish files. If not provided, will create a new release.'
required: false
type: string
push:
branches:
- master
paths-ignore:
- "nuxt/**"
- 'nuxt/**'

jobs:
release:
Expand All @@ -23,7 +23,7 @@ jobs:

steps:
- uses: actions/checkout@v4
- run: yarn
- run: yarn --network-timeout 100000
- uses: cycjimmy/semantic-release-action@8f6ceb9d5aae5578b1dcda6af00008235204e7fa
id: semantic
if: inputs.version == ''
Expand All @@ -50,6 +50,8 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 14.x
cache: 'yarn'
cache-dependency-path: 'yarn.lock'
- name: Install Snapcraft
uses: samuelmeuli/action-snapcraft@06f69b882c878790b568f0247d623eaa49de2f3d
# Only install Snapcraft on Ubuntu
Expand All @@ -60,7 +62,7 @@ jobs:
snapcraft_token: ${{ secrets.snapcraft_token }}
- name: set version
run: yarn version --no-git-tag-version --new-version ${{ env.NEW_RELEASE_VERSION }}
- run: yarn
- run: yarn --network-timeout 100000
- name: Build & release Electron app
shell: bash
env:
Expand Down
Loading