mirror of
https://github.com/actions/setup-dotnet.git
synced 2025-08-20 15:40:20 +00:00
ci(workflow): add 'npm' cache for actions/setup-node in .github/workflows
This commit is contained in:
parent
4b337272b7
commit
52ede626a0
35
.github/workflows/workflow.yml
vendored
35
.github/workflows/workflow.yml
vendored
@ -3,13 +3,13 @@ name: Main workflow
|
|||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
- '**.md'
|
- "**.md"
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
- releases/*
|
- releases/*
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
- '**.md'
|
- "**.md"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@ -19,19 +19,20 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
operating-system: [ubuntu-latest, windows-latest, macOS-latest]
|
operating-system: [ubuntu-latest, windows-latest, macOS-latest]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
- name: Set Node.js 12
|
- name: Set Node.js 12
|
||||||
uses: actions/setup-node@v1
|
uses: actions/setup-node@v2
|
||||||
with:
|
with:
|
||||||
node-version: 12.x
|
node-version: 12.x
|
||||||
- run: npm ci
|
cache: npm
|
||||||
- run: npm run build
|
- run: npm ci
|
||||||
- run: npm run format-check
|
- run: npm run build
|
||||||
- run: npm test
|
- run: npm run format-check
|
||||||
- name: Verify no unstaged changes
|
- run: npm test
|
||||||
if: runner.os != 'windows'
|
- name: Verify no unstaged changes
|
||||||
run: __tests__/verify-no-unstaged-changes.sh
|
if: runner.os != 'windows'
|
||||||
|
run: __tests__/verify-no-unstaged-changes.sh
|
||||||
|
|
||||||
test-setup-full-version:
|
test-setup-full-version:
|
||||||
runs-on: ${{ matrix.operating-system }}
|
runs-on: ${{ matrix.operating-system }}
|
||||||
@ -82,11 +83,11 @@ jobs:
|
|||||||
- name: Setup dotnet '3.1'
|
- name: Setup dotnet '3.1'
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
dotnet-version: '3.1'
|
dotnet-version: "3.1"
|
||||||
- name: Setup dotnet '2.2'
|
- name: Setup dotnet '2.2'
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
dotnet-version: '2.2'
|
dotnet-version: "2.2"
|
||||||
- name: Verify dotnet
|
- name: Verify dotnet
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
run: __tests__/verify-dotnet.ps1 3.1 2.2
|
run: __tests__/verify-dotnet.ps1 3.1 2.2
|
||||||
|
Loading…
x
Reference in New Issue
Block a user