Skip to content

fix: migrate to common prism setup #996

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

Merged
merged 2 commits into from
May 5, 2020
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
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -325,4 +325,5 @@ $RECYCLE.BIN/
# Code
/.vscode

.env
.env
prism
14 changes: 6 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,19 @@ solution: SendGrid.sln
os: linux
dist: bionic
mono: latest
sudo: required

services:
- docker

before_install:
- mkdir -p .nuget
- wget -O .nuget/nuget.exe https://dist.nuget.org/win-x86-commandline/latest/nuget.exe

before_script:
# https://github.com/dotnet/sdk/issues/335
- if test "$TRAVIS_OS_NAME" == "osx"; then export FrameworkPathOverride=/Library/Frameworks/Mono.framework/Versions/Current/lib/mono/4.5/; else export FrameworkPathOverride=/usr/lib/mono/4.5/; fi
- mkdir prism/bin
- export PATH=$PATH:$PWD/prism/bin/
- ./prism/prism.sh
- nohup prism run -s https://raw.githubusercontent.com/sendgrid/sendgrid-oai/master/oai_stoplight.json &
env:
- FrameworkPathOverride=/usr/lib/mono/4.5/

script:
- make test-docker
- make release

after_success:
Expand Down
20 changes: 20 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM mono:latest

ENV FrameworkPathOverride /usr/lib/mono/4.5/

RUN apt-get update \
&& apt-get install -y curl make apt-transport-https

RUN curl -sSL https://packages.microsoft.com/config/ubuntu/19.10/packages-microsoft-prod.deb -o packages-microsoft-prod.deb \
&& dpkg --install packages-microsoft-prod.deb

RUN apt-get update \
&& apt-get install -y dotnet-sdk-2.1

COPY prism/prism/nginx/cert.crt /usr/local/share/ca-certificates/cert.crt
RUN update-ca-certificates

WORKDIR /app
COPY . .

RUN make install
11 changes: 8 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: clean test install release
.PHONY: clean install test test-integ test-docker release

clean:
dotnet clean
Expand All @@ -8,12 +8,17 @@ install:
dotnet restore

test:
dotnet restore
dotnet build ./src/SendGrid -c Release
dotnet test ./tests/SendGrid.Tests/SendGrid.Tests.csproj -c Release -f netcoreapp2.1
curl -s https://codecov.io/bash > .codecov
chmod +x .codecov
./.codecov

release: test
test-integ: test

test-docker:
curl -s https://raw.githubusercontent.com/sendgrid/sendgrid-oai/master/prism/prism.sh | bash

release:
dotnet build ./src/SendGrid -c Release
dotnet pack ./src/SendGrid -c Release
42 changes: 0 additions & 42 deletions prism/prism.sh

This file was deleted.

6 changes: 0 additions & 6 deletions src/SendGrid/SendGrid.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,6 @@
<AdditionalFiles Include="stylecop.json" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="StyleCop.Analyzers" Version="1.0.0">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard1.3' ">
<PackageReference Include="Newtonsoft.Json" Version="9.0.1" />
</ItemGroup>
Expand Down
Loading