Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into dependabot/npm_and_…
Browse files Browse the repository at this point in the history
…yarn/node-notifier-8.0.1
  • Loading branch information
Vladimir Safonkin committed Jun 28, 2021
2 parents 9fdd50a + 181f10d commit b25fa30
Show file tree
Hide file tree
Showing 20 changed files with 1,695 additions and 536 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @actions/virtual-environments-owners
33 changes: 21 additions & 12 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,31 @@
name: Bug report
about: Create a bug report
title: ''
labels: ''
labels: bug, needs triage
assignees: ''

---

### Description
**Description:**
A clear and concise description of what the bug is.

<!--
* Please share short description of the problem
-->
**Task version:**
Specify the task version

### Details
**Platform:**
- [ ] Ubuntu
- [ ] macOS
- [ ] Windows

<!--
* Include the relevant yaml, platform, and dotnet versions in use
* If an error occurred on a public action, please share a link
* Include any error messages received in text (search does not work for images)
* Was this a regression from previous behavior?
-->
**Runner type:**
- [ ] Hosted
- [ ] Self-hosted

**Repro steps:**
A description with steps to reproduce the issue. If your have a public example or repo to share, please provide the link.

**Expected behavior:**
A description of what you expected to happen.

**Actual behavior:**
A description of what is actually happening.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
blank_issues_enabled: true
blank_issues_enabled: false
contact_links:
- name: .NET issues
url: https://github.com/dotnet/runtime#filing-issues
Expand Down
16 changes: 16 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: feature request, needs triage
assignees: ''
---

**Description:**
Describe your proposal.

**Justification:**
Justification or a use case for your proposal.

**Are you willing to submit a PR?**
<!--- We accept contributions! -->
9 changes: 9 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
**Description:**
Describe your changes.

**Related issue:**
Add link to the related issue.

**Check list:**
- [ ] Mark if documentation changes are required.
- [ ] Mark if tests were added or updated to cover the changes.
28 changes: 28 additions & 0 deletions .github/workflows/release-new-action-version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Release new action version
on:
release:
types: [released]
workflow_dispatch:
inputs:
TAG_NAME:
description: 'Tag name that the major tag will point to'
required: true

env:
TAG_NAME: ${{ github.event.inputs.TAG_NAME || github.event.release.tag_name }}
permissions:
contents: write

jobs:
update_tag:
name: Update the major tag to include the ${{ github.event.inputs.TAG_NAME || github.event.release.tag_name }} changes
environment:
name: releaseNewActionVersion
runs-on: ubuntu-latest
steps:
- name: Update the ${{ env.TAG_NAME }} tag
id: update-major-tag
uses: actions/publish-action@v0.1.0
with:
source-tag: ${{ env.TAG_NAME }}
slack-webhook: ${{ secrets.SLACK_WEBHOOK }}
37 changes: 37 additions & 0 deletions .github/workflows/test-dotnet.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Validate dotnet

on:
pull_request:
paths-ignore:
- '**.md'
push:
branches:
- main
- releases/*
paths-ignore:
- '**.md'

jobs:
setup-version:
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-latest, windows-latest, macOS-latest]
dotnet-version: ['2.1', '2.2', '3.0', '3.1', '5.0']
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Clear toolcache
shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
- name: Setup dotnet ${{ matrix.dotnet-version }}
uses: ./
with:
dotnet-version: ${{ matrix.dotnet-version }}
- name: Check installed version
shell: pwsh
run: |
$version = & dotnet --version
Write-Host "Installed version: $version"
if (-not $version.StartsWith("${{ matrix.dotnet-version }}")) { throw "Unexpected version" }
150 changes: 77 additions & 73 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@ name: Main workflow

on:
pull_request:
paths-ignore:
- '**.md'
push:
branches:
- main
- releases/*
paths-ignore:
- '**.md'

jobs:
build:
Expand All @@ -29,7 +33,7 @@ jobs:
if: runner.os != 'windows'
run: __tests__/verify-no-unstaged-changes.sh

test:
test-setup-full-version:
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
Expand All @@ -38,25 +42,9 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Clear tool cache (macOS)
if: runner.os == 'macos'
run: |
echo $PATH
dotnet --info
rm -rf "/Users/runner/.dotnet"
- name: Clear tool cache (Ubuntu)
if: runner.os == 'linux'
run: |
echo $PATH
dotnet --info
rm -rf "/usr/share/dotnet"
- name: Clear tool cache (Windows)
if: runner.os == 'windows'
run: |
echo $env:PATH
dotnet --info
Remove-Item $env:LocalAppData\Microsoft\dotnet/* -Recurse -Force -ErrorAction SilentlyContinue
Remove-Item "$env:ProgramFiles\dotnet/*" -Recurse -Force -ErrorAction SilentlyContinue
- name: Clear toolcache
shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
# Side-by-side install of 2.2 and 3.1 used for the test project
- name: Setup dotnet 2.2.402
uses: ./
Expand All @@ -70,70 +58,86 @@ jobs:
source-url: https://api.nuget.org/v3/index.json
env:
NUGET_AUTH_TOKEN: NOTATOKEN
- name: Verify nuget config file
shell: pwsh
run: |
if (-Not (Test-Path "../nuget.config")) { throw "nuget file not generated correctly" }
- name: Verify dotnet
if: runner.os != 'windows'
run: __tests__/verify-dotnet.sh 3.1.201 2.2.402
- name: Verify dotnet (Windows)
if: runner.os == 'windows'
shell: pwsh
run: __tests__/verify-dotnet.ps1 3.1.201 2.2.402

# Set new cache before 2 digit install
- name: Set new tool cache (macOS)
if: runner.os == 'macos'
run: |
echo "DOTNET_INSTALL_DIR=/Users/runner/.dotnet2" >> $GITHUB_ENV
- name: Set new tool cache (Ubuntu)
if: runner.os == 'linux'
run: |
echo "DOTNET_INSTALL_DIR=/home/runner/.dotnet2" >> $GITHUB_ENV
- name: Set new tool cache (Windows)
if: runner.os == 'windows'
shell: bash
run: |
echo "DOTNET_INSTALL_DIR=$LocalAppData\Microsoft\dotnet2" >> $GITHUB_ENV
test-setup-without-patch-version:
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-latest, windows-latest, macOS-latest]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Clear toolcache
shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
# 2.0, 3.0, 5.0 needs to be in single quotes to interpret as a string instead of as an integer
- name: Setup dotnet '2.0'
- name: Setup dotnet '3.1'
uses: ./
with:
dotnet-version: '2.0'

# Clear cache before .x version install
- name: Set new tool cache (macOS)
if: runner.os == 'macos'
run: |
echo "DOTNET_INSTALL_DIR=/Users/runner/.dotnet3" >> $GITHUB_ENV
- name: Set new tool cache (Ubuntu)
if: runner.os == 'linux'
run: |
echo "DOTNET_INSTALL_DIR=/home/runner/.dotnet3" >> $GITHUB_ENV
- name: Set new tool cache (Windows)
if: runner.os == 'windows'
shell: bash
run: |
echo "DOTNET_INSTALL_DIR=$LocalAppData\Microsoft\dotnet3" >> $GITHUB_ENV
- name: Setup dotnet 2.0.x
dotnet-version: '3.1'
- name: Setup dotnet '2.2'
uses: ./
with:
dotnet-version: 2.0.x
dotnet-version: '2.2'
- name: Verify dotnet
shell: pwsh
run: __tests__/verify-dotnet.ps1 3.1 2.2

test-setup-latest-patch-version:
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-latest, windows-latest, macOS-latest]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Clear toolcache
shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
- name: Setup dotnet 3.1.x
uses: ./
with:
dotnet-version: 3.1.x
- name: Setup dotnet 2.2.x
uses: ./
with:
dotnet-version: 2.2.x
- name: Verify dotnet
shell: pwsh
run: __tests__/verify-dotnet.ps1 3.1 2.2

# Clear cache before .* version install
- name: Set new tool cache (macOS)
if: runner.os == 'macos'
run: |
echo "DOTNET_INSTALL_DIR=/Users/runner/.dotnet4" >> $GITHUB_ENV
- name: Set new tool cache (Ubuntu)
if: runner.os == 'linux'
run: |
echo "DOTNET_INSTALL_DIR=/home/runner/.dotnet4" >> $GITHUB_ENV
- name: Set new tool cache (Windows)
if: runner.os == 'windows'
shell: bash
run: |
echo "DOTNET_INSTALL_DIR=$LocalAppData\Microsoft\dotnet4" >> $GITHUB_ENV
- name: Setup dotnet 2.0.*
test-setup-with-wildcard:
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-latest, windows-latest, macOS-latest]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Clear toolcache
shell: pwsh
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
- name: Setup dotnet 3.1.*
uses: ./
with:
dotnet-version: 2.0.*
dotnet-version: 3.1.*
- name: Setup dotnet 2.2.*
uses: ./
with:
dotnet-version: 2.2.*
- name: Verify dotnet
shell: pwsh
run: __tests__/verify-dotnet.ps1 3.1 2.2

test-proxy:
runs-on: ubuntu-latest
Expand Down
Loading

0 comments on commit b25fa30

Please sign in to comment.