-
Notifications
You must be signed in to change notification settings - Fork 74
59 lines (48 loc) · 1.45 KB
/
test-hosted-runners.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
name: Run Tests
#
# Create some files with script/new-artifact.sh and confirm they are properly packaged and uploaded
# as artifacts with the actions.
#
# This is tested on all OS platforms where we have hosted runners.
#
on:
push:
branches:
- main
pull_request:
jobs:
test:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Generate files
run: mkdir artifact && mkdir artifact2 && cd artifact && ../script/new-artifact.sh
shell: bash
- name: Upload Pages artifact
uses: ./
with:
name: pages-artifact-${{ matrix.os }}
path: artifact
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: pages-artifact-${{ matrix.os }}
path: artifact2
- name: Extract artifact
run: tar -xf artifact2/artifact.tar -C artifact2 && rm artifact2/artifact.tar
shell: bash
- name: Check for absence of hidden files
run: if [ $(find artifact2 -regex ".*/\..*" | wc -l) != 0 ]; then echo "Hidden files found"; exit 1; fi
shell: bash
- name: Compare files
run: |
rm artifact/.hidden
diff -qr artifact artifact2
shell: bash
- name: Check for absence of symlinks
run: if [ $(find artifact2 -type l | wc -l) != 0 ]; then echo "Symlinks found"; exit 1; fi
shell: bash