-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (45 loc) · 1.6 KB
/
tests.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
name: Quick tests against our own repository
on:
push:
# Allow workflow to be manually run from the GitHub UI
workflow_dispatch:
jobs:
check_dry_run_no_branches:
runs-on: ubuntu-latest
name: Runs the action with no ignore branches
steps:
- name: Checkout
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 #v3.6.0
- name: Build action container
run: docker build -t action_container .
- name: "Test: default options"
run: |
docker run --rm -t \
-e GITHUB_REPOSITORY \
-e GITHUB_OUTPUT \
-v "${GITHUB_OUTPUT}:${GITHUB_OUTPUT}" \
action_container \
--github-token="${{ github.token }}"
- name: "Test: ignore branch 'test_prefix/two'"
run: |
docker run --rm -t \
-e GITHUB_REPOSITORY \
-e GITHUB_OUTPUT \
-v "${GITHUB_OUTPUT}:${GITHUB_OUTPUT}" \
action_container \
--ignore-branches="test_prefix/two" \
--last-commit-age-days=9 \
--dry-run=yes \
--github-token="${{ github.token }}"
- name: "Test: allow only`test_prefix/*` except for `test_prefix/two`"
run: |
docker run --rm -t \
-e GITHUB_REPOSITORY \
-e GITHUB_OUTPUT \
-v "${GITHUB_OUTPUT}:${GITHUB_OUTPUT}" \
action_container \
--allowed-prefixes=test_prefix/ \
--ignore-branches=test_prefix/two \
--last-commit-age-days=9 \
--dry-run=yes \
--github-token="${{ github.token }}"