Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: merge publish workflows and test cli #44

Merged
merged 2 commits into from
Jul 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,31 @@
name: Packages publication

on:
release:
types: [created]

jobs:
build:
publish:
runs-on: ubuntu-latest
strategy:
matrix:
package:
- Criteo.OpenApi.Comparator
- Criteo.OpenApi.Comparator.Cli
steps:
- uses: actions/checkout@v3
- name: Setup .NET Core SDK ${{ matrix.dotnet-version }}
- name: Setup .NET Core SDK
uses: actions/setup-dotnet@v2
with:
dotnet-version: |
6.x
8.x
- name: Publish Criteo.OpenApi.Comparator to NuGet
id: publish_package_nuget
- name: Publish ${{ matrix.package }} to NuGet
uses: brandedoutcast/publish-nuget@v2
with:
PROJECT_FILE_PATH: src/Criteo.OpenApi.Comparator/Criteo.OpenApi.Comparator.csproj
PROJECT_FILE_PATH: src/${{ matrix.package }}/${{ matrix.package }}.csproj
BUILD_CONFIGURATION: Release
TAG_COMMIT: true
TAG_FORMAT: v*
NUGET_KEY: ${{secrets.NUGET_API_KEY}}
PACKAGE_NAME: Criteo.OpenApi.Comparator
PACKAGE_NAME: ${{ matrix.package }}
25 changes: 0 additions & 25 deletions .github/workflows/publish_cli.yml

This file was deleted.

42 changes: 35 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,47 @@
name: Continuous Integration
on: [push]

on:
push:

jobs:
build:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET Core SDK ${{ matrix.dotnet-version }}
- name: Setup .NET Core SDK
uses: actions/setup-dotnet@v2
with:
dotnet-version: |
6.x
8.x
- name: Install dependencies
run: dotnet restore ./src/Criteo.OpenApi.Comparator.UTest
- name: Build
run: dotnet build ./src/Criteo.OpenApi.Comparator.UTest --configuration Release --no-restore
run: dotnet build
- name: Test
run: dotnet test ./src/Criteo.OpenApi.Comparator.UTest --no-restore --verbosity minimal
run: dotnet test --no-build
- name: Run CLI with absolute paths
run: >
dotnet run
--no-build
--project src/Criteo.OpenApi.Comparator.Cli/Criteo.OpenApi.Comparator.Cli.csproj
--framework net8
-o $PWD/src/Criteo.OpenApi.Comparator.UTest/Resource/reference_redirection_type_changed/old.yaml
-n $PWD/src/Criteo.OpenApi.Comparator.UTest/Resource/reference_redirection_type_changed/new.yaml
if: always()
- name: Run CLI with relative paths
run: >
dotnet run
--no-build
--project src/Criteo.OpenApi.Comparator.Cli/Criteo.OpenApi.Comparator.Cli.csproj
--framework net8
-o src/Criteo.OpenApi.Comparator.UTest/Resource/reference_redirection_type_changed/old.yaml
-n src/Criteo.OpenApi.Comparator.UTest/Resource/reference_redirection_type_changed/new.yaml
if: always()
- name: Run CLI with URLs
run: >
dotnet run
--no-build
--project src/Criteo.OpenApi.Comparator.Cli/Criteo.OpenApi.Comparator.Cli.csproj
--framework net8
-o https://raw.githubusercontent.com/criteo/openapi-comparator/main/src/Criteo.OpenApi.Comparator.UTest/Resource/reference_redirection_type_changed/old.yaml
-n https://raw.githubusercontent.com/criteo/openapi-comparator/main/src/Criteo.OpenApi.Comparator.UTest/Resource/reference_redirection_type_changed/new.yaml
if: always()
Loading