-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathaction.yml
76 lines (73 loc) · 2.51 KB
/
action.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
68
69
70
71
72
73
74
75
76
name: Sublime Text Syntax Tests
author: FichteFoll
description: Install and run Sublime Text's syntax test runner
branding:
icon: check-circle
color: orange
inputs:
additional_packages:
description: Comma separated list of additional package roots that are linked to the testing Packages folder
required: false
default: ''
additional_tests:
description: Whether to keep the tests of additional packages
required: false
default: false
build:
description: Build that should be installed. Not all builds are available
required: false
default: latest
default_packages:
description: Install the default packages and which version (accepts any git ref)
required: false
default: false
default_tests:
description: Whether to keep the tests of the default packages
required: false
default: false
dummy_syntaxes:
description: Comma-separated list of base scopes to create empty syntaxes for
required: false
default: ''
package_name:
description: Name to install the package as
required: false
default: ${{ github.event.repository.name }} # github.repository has full name
package_root:
description: Path to the package root that is linked to the testing Packages folder
required: false
default: .
outputs: {}
runs:
using: composite
steps:
- name: Install dependencies
# composite steps don't support `if`
run: |
if [[ ${{ inputs.build }} < 4077 ]]; then
echo "::group::Installing dependencies"
sudo apt-get update && sudo apt-get install -y \
libcairo2 \
libgl1 \
libglx-mesa0 \
libglib2.0-0 \
libglu1-mesa \
libgtk-3-0 \
libpango-1.0-0 \
libpangocairo-1.0-0;
echo '::endgroup::'
fi
shell: bash
- name: Download and run syntax tests
run: ${{ github.action_path }}/syntax-tests.sh
shell: bash
env:
# composite actions don't expose input variables by default for some reason (unlike docker actions)
INPUT_ADDITIONAL_PACKAGES: ${{ inputs.additional_packages }}
INPUT_ADDITIONAL_TESTS: ${{ inputs.additional_tests }}
INPUT_BUILD: ${{ inputs.build }}
INPUT_DEFAULT_PACKAGES: ${{ inputs.default_packages }}
INPUT_DEFAULT_TESTS: ${{ inputs.default_tests }}
INPUT_DUMMY_SYNTAXES: ${{ inputs.dummy_syntaxes }}
INPUT_PACKAGE_NAME: ${{ inputs.package_name }}
INPUT_PACKAGE_ROOT: ${{ inputs.package_root }}