-
Notifications
You must be signed in to change notification settings - Fork 330
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
Turn on the CI build for PRs #204
Changes from 5 commits
4826105
9e403e8
f924430
f89915a
74f8080
3afa1c1
d2e91d4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# | ||
# Licensed to the Apache Software Foundation (ASF) under one or more | ||
# contributor license agreements. See the NOTICE file distributed with | ||
# this work for additional information regarding copyright ownership. | ||
# The ASF licenses this file to you under the Apache License, Version 2.0 | ||
# (the "License"); you may not use this file except in compliance with | ||
# the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
name: build-dotnet-solo | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
|
||
jobs: | ||
|
||
build: | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ macos-latest, ubuntu-latest, windows-latest ] | ||
|
||
env: | ||
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 | ||
DOTNET_CLI_TELEMETRY_OPTOUT: 1 | ||
|
||
steps: | ||
|
||
- name: Checkout repository | ||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # 4.1.7 | ||
|
||
- name: Set up dotnet | ||
uses: actions/setup-dotnet@6bd8b7f7774af54e05809fcc5431931b3eb1ddee # 4.0.1 | ||
with: | ||
dotnet-version: 8 | ||
dotnet-quality: ga | ||
|
||
- name: Build | ||
run: | | ||
dotnet build ./src/log4net.sln | ||
|
||
- name: Test | ||
run: | | ||
dotnet test ./src/log4net.sln |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,10 @@ name: build | |
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
|
||
jobs: | ||
|
||
|
@@ -31,6 +35,10 @@ jobs: | |
matrix: | ||
os: [ macos-latest, ubuntu-latest, windows-latest ] | ||
|
||
env: | ||
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 | ||
DOTNET_CLI_TELEMETRY_OPTOUT: 1 | ||
|
||
steps: | ||
|
||
- name: Checkout repository | ||
|
@@ -47,11 +55,20 @@ jobs: | |
with: | ||
node-version: 20 | ||
|
||
- name: Build and test | ||
env: | ||
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 | ||
DOTNET_CLIE_TELEMETRY_OPTOUT: 1 | ||
- name: Setup non-windows build | ||
if: matrix.os != 'windows-latest' | ||
run: | | ||
echo "DOTNET_CORE=1" >> $GITHUB_ENV | ||
|
||
- name: Install build dependencies | ||
run: | | ||
npm update -g npm --no-progress | ||
npm install --no-progress | ||
npm test | ||
|
||
- name: Build | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. minor: build step is not required - There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's true, but it's easier to tell what failed when the phases are separated. |
||
run: | | ||
npm run build | ||
|
||
- name: Test | ||
run: | | ||
npm test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you remove this step since dotnet test also builds the DLLs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would rather not do that. With separate steps, it's easy to see without digging into whether it's a build issue or a failing tests issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point.