summaryrefslogtreecommitdiffstats
path: root/pkg/model/testdata
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/model/testdata')
-rw-r--r--pkg/model/testdata/container-volumes/push.yml19
-rw-r--r--pkg/model/testdata/empty-workflow/push.yml0
-rw-r--r--pkg/model/testdata/invalid-job-name/invalid-1.yml12
-rw-r--r--pkg/model/testdata/invalid-job-name/invalid-2.yml8
-rw-r--r--pkg/model/testdata/invalid-job-name/valid-1.yml8
-rw-r--r--pkg/model/testdata/invalid-job-name/valid-2.yml8
-rw-r--r--pkg/model/testdata/nested/success.yml9
-rw-r--r--pkg/model/testdata/nested/workflows/fail.yml0
-rw-r--r--pkg/model/testdata/strategy/push.yml50
9 files changed, 114 insertions, 0 deletions
diff --git a/pkg/model/testdata/container-volumes/push.yml b/pkg/model/testdata/container-volumes/push.yml
new file mode 100644
index 0000000..1ed27f2
--- /dev/null
+++ b/pkg/model/testdata/container-volumes/push.yml
@@ -0,0 +1,19 @@
+name: Job Container
+on: push
+
+jobs:
+ with-volumes:
+ runs-on: ubuntu-latest
+ container:
+ image: node:16-buster-slim
+ volumes:
+ - my_docker_volume:/path/to/volume
+ - /path/to/nonexist/directory
+ - /proc/sys/kernel/random/boot_id:/current/boot_id
+ steps:
+ - run: |
+ set -e
+ test -d /path/to/volume
+ test "$(cat /proc/sys/kernel/random/boot_id)" = "$(cat /current/boot_id)"
+ test -d /path/to/nonexist/directory
+ \ No newline at end of file
diff --git a/pkg/model/testdata/empty-workflow/push.yml b/pkg/model/testdata/empty-workflow/push.yml
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/pkg/model/testdata/empty-workflow/push.yml
diff --git a/pkg/model/testdata/invalid-job-name/invalid-1.yml b/pkg/model/testdata/invalid-job-name/invalid-1.yml
new file mode 100644
index 0000000..b7129d4
--- /dev/null
+++ b/pkg/model/testdata/invalid-job-name/invalid-1.yml
@@ -0,0 +1,12 @@
+name: invalid-job-name-1
+on: push
+
+jobs:
+ invalid-JOB-Name-v1.2.3-docker_hub:
+ runs-on: ubuntu-latest
+ steps:
+ - run: echo hi
+ valid-JOB-Name-v123-docker_hub:
+ runs-on: ubuntu-latest
+ steps:
+ - run: echo hi
diff --git a/pkg/model/testdata/invalid-job-name/invalid-2.yml b/pkg/model/testdata/invalid-job-name/invalid-2.yml
new file mode 100644
index 0000000..33dd31d
--- /dev/null
+++ b/pkg/model/testdata/invalid-job-name/invalid-2.yml
@@ -0,0 +1,8 @@
+name: invalid-job-name-2
+on: push
+
+jobs:
+ 1234invalid-JOB-Name-v123-docker_hub:
+ runs-on: ubuntu-latest
+ steps:
+ - run: echo hi
diff --git a/pkg/model/testdata/invalid-job-name/valid-1.yml b/pkg/model/testdata/invalid-job-name/valid-1.yml
new file mode 100644
index 0000000..42e8293
--- /dev/null
+++ b/pkg/model/testdata/invalid-job-name/valid-1.yml
@@ -0,0 +1,8 @@
+name: valid-job-name-1
+on: push
+
+jobs:
+ valid-JOB-Name-v123-docker_hub:
+ runs-on: ubuntu-latest
+ steps:
+ - run: echo hi
diff --git a/pkg/model/testdata/invalid-job-name/valid-2.yml b/pkg/model/testdata/invalid-job-name/valid-2.yml
new file mode 100644
index 0000000..3e5c7bc
--- /dev/null
+++ b/pkg/model/testdata/invalid-job-name/valid-2.yml
@@ -0,0 +1,8 @@
+name: valid-job-name-2
+on: push
+
+jobs:
+ ___valid-JOB-Name-v123-docker_hub:
+ runs-on: ubuntu-latest
+ steps:
+ - run: echo hi
diff --git a/pkg/model/testdata/nested/success.yml b/pkg/model/testdata/nested/success.yml
new file mode 100644
index 0000000..f65ee91
--- /dev/null
+++ b/pkg/model/testdata/nested/success.yml
@@ -0,0 +1,9 @@
+name: Hello World Workflow
+on: push
+
+jobs:
+ hello-world:
+ name: Hello World Job
+ runs-on: ubuntu-latest
+ steps:
+ - run: echo "Hello World!"
diff --git a/pkg/model/testdata/nested/workflows/fail.yml b/pkg/model/testdata/nested/workflows/fail.yml
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/pkg/model/testdata/nested/workflows/fail.yml
diff --git a/pkg/model/testdata/strategy/push.yml b/pkg/model/testdata/strategy/push.yml
new file mode 100644
index 0000000..89bea6e
--- /dev/null
+++ b/pkg/model/testdata/strategy/push.yml
@@ -0,0 +1,50 @@
+---
+jobs:
+ strategy-all:
+ name: ${{ matrix.node-version }} | ${{ matrix.site }} | ${{ matrix.datacenter }}
+ runs-on: ubuntu-latest
+ steps:
+ - run: echo 'Hello!'
+ strategy:
+ fail-fast: false
+ matrix:
+ datacenter:
+ - site-c
+ - site-d
+ exclude:
+ - datacenter: site-d
+ node-version: 14.x
+ site: staging
+ include:
+ - php-version: 5.4
+ - datacenter: site-a
+ node-version: 10.x
+ site: prod
+ - datacenter: site-b
+ node-version: 12.x
+ site: dev
+ node-version: [14.x, 16.x]
+ site:
+ - staging
+ max-parallel: 2
+ strategy-no-matrix:
+ runs-on: ubuntu-latest
+ steps:
+ - run: echo 'Hello!'
+ strategy:
+ fail-fast: false
+ max-parallel: 2
+ strategy-only-fail-fast:
+ runs-on: ubuntu-latest
+ steps:
+ - run: echo 'Hello!'
+ strategy:
+ fail-fast: false
+ strategy-only-max-parallel:
+ runs-on: ubuntu-latest
+ steps:
+ - run: echo 'Hello!'
+ strategy:
+ max-parallel: 2
+'on':
+ push: null