forked from trunk-io/plugins
-
Notifications
You must be signed in to change notification settings - Fork 0
95 lines (86 loc) · 3.6 KB
/
windows_nightly.yaml
File metadata and controls
95 lines (86 loc) · 3.6 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
name: Windows Tests
on:
# NOTE(Tyler): Preserve this workflow for testing, but in the future we'll want to remove it.
workflow_dispatch: {}
permissions: read-all
jobs:
# Run tests against all linters for snapshots and latest version as they exist on main
# This job is used to diagnose plugin config health in advance of a release
linter_tests_main:
name: Linter Tests Main
runs-on: windows-latest
timeout-minutes: 90
strategy:
fail-fast: false
matrix:
linter-version: [Snapshots, Latest]
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Cache tool downloads
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
with:
path: /tmp/plugins_testing_download_cache
# No need to key on trunk version unless we change how we store downloads.
key: trunk-${{ runner.os }}
- name: Delete cache
# For now, avoid deleting cache on pull request changes to nightly. This improves PR experience.
if: env.TRIGGER != 'pull_request'
run: |
if [ -d "/tmp/plugins_testing_download_cache" ]
then
tmp_dir=/tmp/${GITHUB_RUN_ID}-${GITHUB_RUN_NUMBER}-${GITHUB_RUN_ATTEMPT}
mv "/tmp/plugins_testing_download_cache" ${tmp_dir}
chmod -R u+w ${tmp_dir}
rm -rf ${tmp_dir}
fi
shell: bash
- name: Linter Tests
uses: ./.github/actions/linter_tests
with:
linter-version: ${{ matrix.linter-version }}
ref-type: main
snyk-token: ${{ secrets.TRUNK_SNYK_TOKEN }}
sourcery-token: ${{ secrets.TRUNK_SOURCERY_TOKEN }}
cli-path: ${{ github.workspace }}\trunk.ps1
# manually specify more parallelism to avoid bottlenecks
append-args: linters -- --maxWorkers=5
# Analytics uploader is not yet supported on Windows
trunk-staging-token: ${{ secrets.TRUNK_DEBUGGER_TOKEN }}
trunk-prod-token: ${{ secrets.TRUNK_ORG_PROD_TOKEN }}
tool_tests_main:
name: Tool Tests Main
runs-on: windows-latest
timeout-minutes: 90
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Cache tool downloads
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
with:
path: /tmp/plugins_testing_download_cache
# No need to key on trunk version unless we change how we store downloads.
key: trunk-${{ runner.os }}
- name: Delete cache
# For now, avoid deleting cache on pull request changes to nightly. This improves PR experience.
if: env.TRIGGER != 'pull_request'
run: |
if [ -d "/tmp/plugins_testing_download_cache" ]
then
tmp_dir=/tmp/${GITHUB_RUN_ID}-${GITHUB_RUN_NUMBER}-${GITHUB_RUN_ATTEMPT}
mv "/tmp/plugins_testing_download_cache" ${tmp_dir}
chmod -R u+w ${tmp_dir}
rm -rf ${tmp_dir}
fi
shell: bash
# TODO(lauri): For now this just runs on the hardcoded versions. We should configure this
# akin to the linter_tests job.
- name: Tool Tests
if: failure() || success()
uses: ./.github/actions/tool_tests
with:
cli-path: ${{ github.workspace }}\trunk.ps1
append-args: tools -- --maxWorkers=5
# Analytics uploader is not yet supported on Windows
trunk-staging-token: ${{ secrets.TRUNK_DEBUGGER_TOKEN }}
trunk-prod-token: ${{ secrets.TRUNK_ORG_PROD_TOKEN }}