Skip to content

Commit 0041cb6

Browse files
authored
Add infra for github actions (#802)
- Infrastructure to format, lint, and test GitHub Actions - Mostly copied from azure-rest-api-specs repo
1 parent a73dd47 commit 0041cb6

17 files changed

Lines changed: 4931 additions & 62 deletions

.gitattributes

Lines changed: 3 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,4 @@
1-
###############################################################################
2-
# Set default behavior to automatically normalize line endings.
3-
###############################################################################
4-
* text=auto
1+
# Copied from https://github.com/Azure/azure-rest-api-specs/blob/main/.gitattributes
52

6-
###############################################################################
7-
# Set default behavior for command prompt diff.
8-
#
9-
# This is need for earlier builds of msysgit that does not have it on by
10-
# default for csharp files.
11-
# Note: This is only used by command line
12-
###############################################################################
13-
#*.cs diff=csharp
14-
15-
###############################################################################
16-
# Set the merge driver for project and solution files
17-
#
18-
# Merging from the command prompt will add diff markers to the files if there
19-
# are conflicts (Merging from VS is not affected by the settings below, in VS
20-
# the diff markers are never inserted). Diff markers may cause the following
21-
# file extensions to fail to load in VS. An alternative would be to treat
22-
# these files as binary and thus will always conflict and require user
23-
# intervention with every merge. To do so, just uncomment the entries below
24-
###############################################################################
25-
#*.sln merge=binary
26-
#*.csproj merge=binary
27-
#*.vbproj merge=binary
28-
#*.vcxproj merge=binary
29-
#*.vcproj merge=binary
30-
#*.dbproj merge=binary
31-
#*.fsproj merge=binary
32-
#*.lsproj merge=binary
33-
#*.wixproj merge=binary
34-
#*.modelproj merge=binary
35-
#*.sqlproj merge=binary
36-
#*.wwaproj merge=binary
37-
38-
###############################################################################
39-
# behavior for image files
40-
#
41-
# image files are treated as binary by default.
42-
###############################################################################
43-
#*.jpg binary
44-
#*.png binary
45-
#*.gif binary
46-
47-
###############################################################################
48-
# diff behavior for common document formats
49-
#
50-
# Convert binary document formats to text before diffing them. This feature
51-
# is only available from the command line. Turn it on by uncommenting the
52-
# entries below.
53-
###############################################################################
54-
#*.doc diff=astextplain
55-
#*.DOC diff=astextplain
56-
#*.docx diff=astextplain
57-
#*.DOCX diff=astextplain
58-
#*.dot diff=astextplain
59-
#*.DOT diff=astextplain
60-
#*.pdf diff=astextplain
61-
#*.PDF diff=astextplain
62-
#*.rtf diff=astextplain
63-
#*.RTF diff=astextplain
3+
# Use unix line endings always, even on Windows
4+
* text=auto eol=lf

.github/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# TypeScript cache
2+
*.tsbuildinfo

.github/.prettierignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Includes subset of https://github.com/Azure/azure-rest-api-specs/blob/main/.github/.prettierignore
2+
3+
# code coverage
4+
coverage
5+
6+
# unmanaged files and folders
7+
ISSUE_TEMPLATE

.github/.prettierrc.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Copied from https://github.com/Azure/azure-rest-api-specs/blob/main/.github/.prettierrc.yaml
2+
3+
plugins:
4+
- prettier-plugin-organize-imports
5+
6+
# Aligned with microsoft/typespec
7+
printWidth: 100
8+
9+
overrides:
10+
# tsconfig.json is actually parsed as JSONC
11+
- files:
12+
- tsconfig.json
13+
- tsconfig.*.json
14+
options:
15+
parser: jsonc

.github/eslint.config.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// Copied from https://github.com/Azure/azure-rest-api-specs/blob/main/.github/eslint.config.js
2+
3+
import eslint from "@eslint/js";
4+
import { defineConfig } from "eslint/config";
5+
import globals from "globals";
6+
import tseslint from "typescript-eslint";
7+
8+
/** @type {import('eslint').Linter.Config[]} */
9+
export default defineConfig(eslint.configs.recommended, tseslint.configs.recommended, {
10+
languageOptions: { globals: globals.node },
11+
});

.github/matchers/actionlint.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"problemMatcher": [
3+
{
4+
"owner": "actionlint",
5+
"pattern": [
6+
{
7+
"regexp": "^(?:\\x1b\\[\\d+m)?(.+?)(?:\\x1b\\[\\d+m)*:(?:\\x1b\\[\\d+m)*(\\d+)(?:\\x1b\\[\\d+m)*:(?:\\x1b\\[\\d+m)*(\\d+)(?:\\x1b\\[\\d+m)*: (?:\\x1b\\[\\d+m)*(.+?)(?:\\x1b\\[\\d+m)* \\[(.+?)\\]$",
8+
"file": 1,
9+
"line": 2,
10+
"column": 3,
11+
"message": 4,
12+
"code": 5
13+
}
14+
]
15+
}
16+
]
17+
}

0 commit comments

Comments
 (0)