This repository has been archived by the owner on Dec 26, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
96 lines (95 loc) · 2.84 KB
/
test-local-action-inside-home.yaml
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
96
name: "Test local action inside $HOME"
on:
workflow_dispatch:
pull_request:
release:
types: [published]
push:
branches: ["main"]
tags: ["*"]
jobs:
local_test_home:
runs-on: ubuntu-latest
env:
BATS_LIB_PATH: "${{ github.workspace }}/tests"
TERM: xterm
name: local default
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Bats and Bats libs
uses: ./
with:
support-clean: "false"
support-path: "${{ github.workspace }}/tests/bats-support"
assert-clean: "false"
assert-path: "${{ github.workspace }}/tests/bats-assert"
detik-clean: "false"
detik-path: "${{ github.workspace }}/tests/bats-detik"
file-clean: "false"
file-path: "${{ github.workspace }}/tests/bats-file"
- name: Execute test to check Bats-support
run: |
cd /tmp/bats-support/
bats test
- name: Execute test to check Bats-assert
run: |
ls -l $BATS_LIB_PATH/
cd /tmp/bats-assert/
bats test
- name: Execute test to check Bats-detik
run: |
cd /tmp/bats-detik/
bats tests
- name: Execute test to check Bats-file
# Currently the bats-file tests are broken
# in gh runner env
continue-on-error: true
run: |
cd /tmp/bats-file/
bats test
- name: Execute example tests
run:
bats -T -p tests
local_test_home_trigger_cache:
needs: [local_test_home]
runs-on: ubuntu-latest
env:
BATS_LIB_PATH: "${{ github.workspace }}/tests"
TERM: xterm
name: local default cache
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Bats and Bats libs
id: setup-bats-libs
uses: ./
with:
support-clean: "false"
support-path: "${{ github.workspace }}/tests/bats-support"
assert-clean: "false"
assert-path: "${{ github.workspace }}/tests/bats-assert"
detik-clean: "false"
detik-path: "${{ github.workspace }}/tests/bats-detik"
file-clean: "false"
file-path: "${{ github.workspace }}/tests/bats-file"
- name: Execute test to check Bats-support
if: steps.setup-bats-libs.outputs.support-installed == 'True'
run: |
cd /tmp/bats-support/
bats test
- name: Execute test to check Bats-assert
run: |
cd /tmp/bats-assert/
bats test
- name: Execute test to check Bats-detik
run: |
cd /tmp/bats-detik/
bats tests
- name: Execute test to check Bats-file
# Currently the bats-file tests are broken
# in gh runner env
continue-on-error: true
run: |
cd /tmp/bats-file/
bats test