Skip to content
This repository was archived by the owner on Jul 3, 2020. It is now read-only.

Commit 2849669

Browse files
authored
Merge pull request #1 from codacy/first-release
First release
2 parents 158c2d2 + b4a0669 commit 2849669

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+2992
-462
lines changed

.circleci/config.yml

Lines changed: 190 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,190 @@
1+
version: 2.1
2+
3+
orbs:
4+
codacy: codacy/[email protected]
5+
6+
jobs:
7+
build_and_test:
8+
docker:
9+
- image: mcr.microsoft.com/dotnet/core/sdk:2.2
10+
working_directory: ~/workdir
11+
steps:
12+
- checkout
13+
- attach_workspace:
14+
at: ~/
15+
- run:
16+
name: Generate cache key
17+
command: |
18+
shasum src/packages.lock.json \
19+
test/CSharpCoverage.Tests/packages.lock.json > /tmp/dependencies.cache.tmp
20+
- restore_cache:
21+
keys:
22+
- nuget-v1-{{ checksum "/tmp/dependencies.cache.tmp" }}
23+
- nuget-v1-
24+
- run:
25+
name: Restore
26+
command: dotnet restore
27+
- save_cache:
28+
key: nuget-v1-{{ checksum "/tmp/dependencies.cache.tmp" }}
29+
paths:
30+
- "packages"
31+
- run:
32+
name: Compile
33+
command: dotnet build -c Debug
34+
- run:
35+
name: Run tests
36+
command: dotnet test test/CSharpCoverage.Tests
37+
- persist_to_workspace:
38+
root: ~/
39+
paths:
40+
- workdir
41+
42+
build_runtime:
43+
parameters:
44+
framework_version:
45+
type: string
46+
runtime:
47+
type: string
48+
description: "Build to a specific runtime command"
49+
docker:
50+
- image: mcr.microsoft.com/dotnet/core/sdk:<< parameters.framework_version >>
51+
working_directory: ~/workdir
52+
steps:
53+
- attach_workspace:
54+
at: ~/
55+
- run:
56+
name: Install needed packages
57+
command: |
58+
apt-get update
59+
apt-get install -y zip
60+
- run:
61+
name: Build for << parameters.runtime >> (netcoreapp<< parameters.framework_version >>)
62+
command: ./scripts/publish.sh netcoreapp<< parameters.framework_version >> << parameters.runtime >>
63+
- persist_to_workspace:
64+
root: ~/
65+
paths:
66+
- workdir/artifacts/
67+
68+
circleci-artifacts:
69+
machine: true
70+
working_directory: ~/workdir
71+
steps:
72+
- attach_workspace:
73+
at: ~/
74+
- store_artifacts:
75+
path: artifacts/
76+
77+
github-release:
78+
docker:
79+
- image: cibuilds/github:0.12.2
80+
working_directory: ~/workdir
81+
steps:
82+
- attach_workspace:
83+
at: ~/
84+
- run:
85+
name: "Publish Release on GitHub"
86+
command: |
87+
GHR_FLAGS=""
88+
if [ "${CIRCLE_BRANCH}" != "master" ]; then
89+
GHR_FLAGS+="-prerelease"
90+
fi
91+
ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} ${GHR_FLAGS} -delete $(cat .version) ./artifacts/
92+
93+
workflows:
94+
version: 2
95+
build-and-deploy:
96+
jobs:
97+
- codacy/checkout_and_version
98+
- build_and_test:
99+
requires:
100+
- codacy/checkout_and_version
101+
- build_runtime:
102+
name: build_runtime_2.2_linux-x64
103+
framework_version: "2.2"
104+
runtime: linux-x64
105+
requires:
106+
- build_and_test
107+
- build_runtime:
108+
name: build_runtime_2.2_linux-musl-x64
109+
framework_version: "2.2"
110+
runtime: linux-musl-x64
111+
requires:
112+
- build_and_test
113+
- build_runtime:
114+
name: build_runtime_2.2_osx-x64
115+
framework_version: "2.2"
116+
runtime: osx-x64
117+
requires:
118+
- build_and_test
119+
- build_runtime:
120+
name: build_runtime_2.2_win-x64
121+
framework_version: "2.2"
122+
runtime: win-x64
123+
requires:
124+
- build_and_test
125+
- build_runtime:
126+
name: build_runtime_2.2_win-x86
127+
framework_version: "2.2"
128+
runtime: win-x86
129+
requires:
130+
- build_and_test
131+
- build_runtime:
132+
name: build_runtime_3.0_linux-x64
133+
framework_version: "3.0"
134+
runtime: linux-x64
135+
requires:
136+
- build_and_test
137+
- build_runtime:
138+
name: build_runtime_3.0_linux-musl-x64
139+
framework_version: "3.0"
140+
runtime: linux-musl-x64
141+
requires:
142+
- build_and_test
143+
- build_runtime:
144+
name: build_runtime_3.0_osx-x64
145+
framework_version: "3.0"
146+
runtime: osx-x64
147+
requires:
148+
- build_and_test
149+
- build_runtime:
150+
name: build_runtime_3.0_win-x64
151+
framework_version: "3.0"
152+
runtime: win-x64
153+
requires:
154+
- build_and_test
155+
- build_runtime:
156+
name: build_runtime_3.0_win-x86
157+
framework_version: "3.0"
158+
runtime: win-x86
159+
requires:
160+
- build_and_test
161+
- circleci-artifacts:
162+
requires:
163+
- build_runtime_2.2_win-x86
164+
- build_runtime_2.2_win-x64
165+
- build_runtime_2.2_osx-x64
166+
- build_runtime_2.2_linux-musl-x64
167+
- build_runtime_2.2_linux-x64
168+
- build_runtime_3.0_win-x86
169+
- build_runtime_3.0_win-x64
170+
- build_runtime_3.0_osx-x64
171+
- build_runtime_3.0_linux-musl-x64
172+
- build_runtime_3.0_linux-x64
173+
# - build_and_coverage
174+
- github-release:
175+
context: CodacyGitHub
176+
requires:
177+
- build_runtime_2.2_win-x86
178+
- build_runtime_2.2_win-x64
179+
- build_runtime_2.2_osx-x64
180+
- build_runtime_2.2_linux-musl-x64
181+
- build_runtime_2.2_linux-x64
182+
- build_runtime_3.0_win-x86
183+
- build_runtime_3.0_win-x64
184+
- build_runtime_3.0_osx-x64
185+
- build_runtime_3.0_linux-musl-x64
186+
- build_runtime_3.0_linux-x64
187+
# - build_and_coverage
188+
filters:
189+
branches:
190+
only: master

.editorconfig

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
root = true
2+
3+
[*]
4+
end_of_line = lf
5+
insert_final_newline = true
6+
trim_trailing_whitespace = true
7+
8+
[*.cs]
9+
indent_style = space
10+
indent_size = 4
11+
12+
[*.yml]
13+
indent_style = space
14+
indent_size = 2

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ __pycache__/
316316
*.xsd.cs
317317

318318
# OpenCover UI analysis results
319-
OpenCover/
319+
/OpenCover/
320320

321321
# Azure Stream Analytics local run output
322322
ASALocalRun/
@@ -329,3 +329,6 @@ ASALocalRun/
329329

330330
# MFractors (Xamarin productivity tool) working folder
331331
.mfractor/
332+
333+
/artifacts/
334+
/packages.txt

Codacy.CSharpCoverage.sln

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio 15
4+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Codacy.CSharpCoverage", "src\Codacy.CSharpCoverage.csproj", "{3229C6BE-7616-452E-BA52-E9BB7D7DA893}"
5+
EndProject
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSharpCoverage.Tests", "test\CSharpCoverage.Tests\CSharpCoverage.Tests.csproj", "{DB0F5FC8-92DA-4333-A242-FACA000CCA22}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|Any CPU = Debug|Any CPU
11+
Release|Any CPU = Release|Any CPU
12+
EndGlobalSection
13+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14+
{3229C6BE-7616-452E-BA52-E9BB7D7DA893}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{3229C6BE-7616-452E-BA52-E9BB7D7DA893}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{3229C6BE-7616-452E-BA52-E9BB7D7DA893}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{3229C6BE-7616-452E-BA52-E9BB7D7DA893}.Release|Any CPU.Build.0 = Release|Any CPU
18+
{DB0F5FC8-92DA-4333-A242-FACA000CCA22}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
19+
{DB0F5FC8-92DA-4333-A242-FACA000CCA22}.Debug|Any CPU.Build.0 = Debug|Any CPU
20+
{DB0F5FC8-92DA-4333-A242-FACA000CCA22}.Release|Any CPU.ActiveCfg = Release|Any CPU
21+
{DB0F5FC8-92DA-4333-A242-FACA000CCA22}.Release|Any CPU.Build.0 = Release|Any CPU
22+
EndGlobalSection
23+
EndGlobal

0 commit comments

Comments
 (0)