ci(workflow): add cache to workflows using actions/setup-node (#2740)

Co-authored-by: Lucas Nogueira <lucas@tauri.studio>
This commit is contained in:
Oscar Dominguez 2021-10-22 16:33:02 +02:00 committed by GitHub
parent b1f5c6d7ac
commit 651fc01492
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 26 additions and 15 deletions

View File

@ -57,10 +57,11 @@ jobs:
ref: ${{ github.event.inputs.ref }}
path: example
- name: setup node
uses: actions/setup-node@v1
uses: actions/setup-node@v2
with:
node-version: 14
- name: install rust stable
cache: yarn
cache-dependency-path: tooling/*/yarn.lock
uses: actions-rs/toolchain@v1
with:
toolchain: stable

View File

@ -22,10 +22,12 @@ jobs:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-node@v1
- uses: actions/setup-node@v2
with:
node-version: 14
registry-url: "https://registry.npmjs.org"
cache: yarn
cache-dependency-path: tooling/*/yarn.lock
- name: cargo login
run: cargo login ${{ secrets.crate_token }}
- name: git config
@ -125,7 +127,7 @@ jobs:
- uses: iamsauravsharma/create-dotenv@v1.1.0
with:
directory: './tauri-search-bot'
directory: "./tauri-search-bot"
env:
ENV_KEY_DISCORD_BOT_SECRET: ${{ secrets.DISCORD_BOT_SECRET }}
ENV_KEY_PREFIX: \!

View File

@ -7,19 +7,21 @@ name: eslint check
on:
pull_request:
paths:
- '.github/workflows/js-lint.yml'
- 'tooling/cli.js/**'
- 'tooling/api/**'
- 'tooling/create-tauri-app/**'
- ".github/workflows/js-lint.yml"
- "tooling/cli.js/**"
- "tooling/api/**"
- "tooling/create-tauri-app/**"
jobs:
eslint-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/setup-node@v2
with:
node-version: '12'
node-version: "12"
cache: yarn
cache-dependency-path: tooling/*/yarn.lock
- name: install cli.js deps via yarn
working-directory: ./tooling/cli.js/
run: yarn

View File

@ -158,11 +158,17 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: install stable
- name: install Rust stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: setup node
uses: actions/setup-node@v2
with:
node-version: 14
cache: yarn
cache-dependency-path: tooling/cli.js/yarn.lock
- name: install webkit2gtk (ubuntu only)
if: matrix.platform == 'ubuntu-latest'
run: |

View File

@ -72,7 +72,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: setup node
uses: actions/setup-node@v1
uses: actions/setup-node@v2
with:
node-version: 12
- name: install Rust stable

View File

@ -69,7 +69,7 @@ jobs:
# install the latest stable node version at the time of writing
- name: Node v16
uses: actions/setup-node@v1
uses: actions/setup-node@v2
with:
node-version: 16.x

View File

@ -13,7 +13,7 @@ jobs:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-node@v1
- uses: actions/setup-node@v2
with:
node-version: 12
registry-url: 'https://registry.npmjs.org'

View File

@ -13,7 +13,7 @@ jobs:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-node@v1
- uses: actions/setup-node@v2
with:
node-version: 12
registry-url: 'https://registry.npmjs.org'