-
Notifications
You must be signed in to change notification settings - Fork 3
63 lines (53 loc) · 1.5 KB
/
test-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
name: Test actions pipeline
on:
pull_request:
branches: ['main']
push:
branches: ['main']
jobs:
test-action:
name: 'Test get-tested action'
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v4
- name: Extract the tested GHC versions
id: create-matrix
uses: ./
with:
cabal-file: get-tested.cabal
ubuntu-version: 'latest'
macos-version: 'latest'
- name: Output matrix
run: |
jq '.' <<< "${{ steps.create-matrix.matrix }}"
test-setup-action:
name: 'Test setup-get-tested action'
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v4
- name: Set up without options
id: setup
uses: ./setup-get-tested
- name: Set up with explicit directory
id: setup-with-directory
uses: ./setup-get-tested
with:
directory: "my-bin-dir"
- name: Output results
run: |
echo "${{ steps.setup.outputs.path }}"
if [[ -x "${{ steps.setup.outputs.path }}" ]]; then
echo "Is executable"
else
echo "Is NOT executable"
exit 1
fi
echo "${{ steps.setup-with-directory.outputs.path }}"
if [[ -x "${{ steps.setup-with-directory.outputs.path }}" ]]; then
echo "Is executable"
else
echo "Is NOT executable"
exit 1
fi