Repository navigation
61 lines (49 loc) · 1.49 KB
/
Copy pathmain.yml
File metadata and controls
61 lines (49 loc) · 1.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Build + Test
on: [push, pull_request]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
# The archive is what users install, so the license travels
# inside it.
- run: cp LICENSE Microsoft/LICENSE
- run: zip -r Microsoft.zip Microsoft -x "*.DS_Store"
- name: Upload style to release
uses: svenstaro/upload-release-action@v2
if: startsWith(github.ref, 'refs/tags/')
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: Microsoft.zip
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Go
uses: actions/setup-go@v5
with:
go-version: "1.21"
- name: Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install Deps
run: |
wget https://github.com/errata-ai/vale/releases/download/v${VALE_VERSION}/vale_${VALE_VERSION}_Linux_64-bit.tar.gz
mkdir bin && tar -xvzf vale_${VALE_VERSION}_Linux_64-bit.tar.gz -C bin
echo "$PWD/bin" >> $GITHUB_PATH
pip install yamllint pyyaml docutils
env:
VALE_VERSION: 3.16.0
- name: Lint
run: yamllint -c .yamllint.yml Microsoft/ coverage/
- name: Tests
run: go test ./...
- name: Integration
run: vale README.md