mirror of
https://github.com/meysamhadeli/booking-microservices.git
synced 2026-04-11 10:32:09 +08:00
43 lines
833 B
YAML
43 lines
833 B
YAML
name: Build-Test
|
|
|
|
on:
|
|
push:
|
|
branches: [ "main" , "develop" ]
|
|
paths-ignore:
|
|
- "README.md"
|
|
pull_request:
|
|
branches: [ "main" , "develop" ]
|
|
|
|
jobs:
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Setup .NET
|
|
uses: actions/setup-dotnet@v2
|
|
with:
|
|
dotnet-version: 7.0.x
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v2
|
|
with:
|
|
node-version: 'lts/*'
|
|
|
|
- name: Cache NuGet Packages
|
|
uses: actions/cache@v3
|
|
with:
|
|
key: ${{ runner.os }}-dotnet-nuget
|
|
path: ~/.nuget/packages
|
|
|
|
- name: Restore dependencies
|
|
run: dotnet restore
|
|
|
|
- name: Build
|
|
run: dotnet build -c Release --no-restore
|
|
|
|
- name: Test
|
|
run: dotnet test -c Release --no-restore
|
|
|