generated from actions/typescript-action
-
Notifications
You must be signed in to change notification settings - Fork 6
67 lines (66 loc) · 2 KB
/
test.yml
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
name: 'build-test'
on: # rebuild any PRs and main branch changes
pull_request:
push:
tags:
- 'v[0-9]*'
branches:
- main
- 'v[0-9]*'
jobs:
build: # make sure build/ci work properly
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npm ci
- run: npm run build
- run: npm run lint
- run: npm run format && git diff-files
- run: npm run test
- run: npm run package
- name: Verify that `dist/index.js` is up to date
shell: bash
run: |
# `ncc` produces output with mixed line endings
test -z "$(git diff -aw HEAD -- ':(exclude)dist/index.js.map' | tee diff.txt)" || {
echo 'Files changed after `npm run package`'
cat diff.txt
exit 1
}
- uses: actions/upload-artifact@v4
if: failure()
with:
name: diff.txt
path: diff.txt
test: # make sure the action works on a clean machine without building
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run this Action in-place
uses: ./
with:
repository: git/git
definitionId: 10
artifact: sparse-20.04
- name: Verify that the package was downloaded
shell: bash
run: test -f sparse-20.04/sparse_*.deb
test-strip-prefix: # make sure the action works on a clean machine without building
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
repository: microsoft/vcpkg
path: compat/vcbuild/vcpkg
clean: false
- name: Run this Action in-place
uses: ./
with:
repository: git/git
definitionId: 9
path: compat/vcbuild/vcpkg
stripPrefix: compat/vcbuild/vcpkg/
- name: Verify that the artifact files were downloaded
shell: bash
run: compat/vcbuild/vcpkg/vcpkg.exe version && ls -la compat/vcbuild/vcpkg/.git