Skip to content

simplify some linq (#15249) #1

simplify some linq (#15249)

simplify some linq (#15249) #1

Workflow file for this run

name: Preview - CI
on:
push:
paths-ignore:
- '**/*.md'
- 'mkdocs.yml'
- 'src/docs/**/*'
branches: [ main ]
env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
jobs:
test:
runs-on: ${{ matrix.os }}
name: Build, Test, Deploy
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "15"
- uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.0.x'
- name: Set build number
if: matrix.os == 'ubuntu-latest'
run: echo "BuildNumber=$(( $GITHUB_RUN_NUMBER + 16368 ))" >> $GITHUB_ENV
- name: Build
run: |
dotnet build -c Release
- name: Unit Tests
run: |
dotnet test -c Release --no-build ./test/OrchardCore.Tests/OrchardCore.Tests.csproj
- name: Functional Tests
if: matrix.os == 'ubuntu-latest'
run: |
cd test/OrchardCore.Tests.Functional
npm install
npm run cms:test
npm run mvc:test
- uses: actions/upload-artifact@v2
if: matrix.os == 'ubuntu-latest' && failure()
with:
name: Functional Test failure
path: |
test/OrchardCore.Tests.Functional/cms-tests/cypress/screenshots
src/OrchardCore.Cms.Web/App_Data_Tests/logs
- name: Deploy preview nuget packages
if: matrix.os == 'ubuntu-latest'
run: |
dotnet pack -c Release --no-build
dotnet nuget push './src/**/*.nupkg' -t 600 -k ${{secrets.CLOUDSMITH_API_KEY}} -n -s https://nuget.cloudsmith.io/orchardcore/preview/v3/index.json --skip-duplicate
- name: Set up Docker Buildx
if: matrix.os == 'ubuntu-latest'
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
if: matrix.os == 'ubuntu-latest'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Deploy preview docker images
if: matrix.os == 'ubuntu-latest'
shell: pwsh
run: |
Get-ChildItem ./src/OrchardCore.Cms.Web/App_Data -Recurse | Remove-Item -Recurse -Confirm:$false
Get-ChildItem ./src/OrchardCore.Cms.Web/App_Data_Tests -Recurse | Remove-Item -Recurse -Confirm:$false
$output = [System.IO.Path]::GetFullPath("./.build/release")
dotnet publish -c Release --property:PublishDir=$output --no-build --framework net8.0
docker buildx build -f Dockerfile-CI --platform=linux/amd64 -t orchardproject/orchardcore-cms-linux:dev --push .
docker buildx build -f Dockerfile-CI --platform=windows/amd64 -t orchardproject/orchardcore-cms-windows:dev --push .