Github Action

actions/cache

actions/cache-docs

Or click the link below to jump directly to the relevant cache example

  • Examples
    • C# – NuGet
    • D – DUB
    • Elixir – Mix
    • Go – Modules
    • Haskell – Cabal
    • Java – Gradle
    • Java – Maven
    • Node – npm
      • macOS and Ubuntu
      • Windows
      • Using multiple systems and npm config
    • Node – Lerna
    • Node – Yarn
    • Node – Yarn 2
    • OCaml/Reason – esy
    • PHP – Composer
    • Python – pip
      • Simple example
      • Multiple OSes in a workflow
      • Using pip to get cache location
      • Using a script to get cache location
    • Python – pipenv
    • R – renv
      • Simple example
      • Multiple OSes in a workflow
    • Ruby – Bundler
    • Rust – Cargo
    • Scala – SBT
    • Swift, Objective-C – Carthage
    • Swift, Objective-C – CocoaPods
    • Swift – Swift Package Manager

Matrix matrix

Jobs: build: strategy: matrix: # Node-version: [12.x, 14.x, 15.x] # ['ubuntu-latest', 'windows-latest', 'macos-latest'] # run -on: ${{matrix. OS}} # run -on: ${{matrix. OS}} # Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v1 with: node-version: ${{matrix.node-version}} ${matrix.node-version} ${matrix.node-version} ${matrix.node-version} ${matrix.node-version} ${matrix.node-version} ${matrix.node-version} ${matrix.node-version} Run headless unit test if: matrix.os == 'ubuntu-latest' uses: GabrielBB/xvfb-action@v1 with: run: | yarn test yarn e2e # node follow-up tasksCopy the code