Skip to content

Commit 12976f6

Browse files
committed
add more tests
1 parent d8953e3 commit 12976f6

File tree

10 files changed

+80
-7
lines changed

10 files changed

+80
-7
lines changed

.github/workflows/fixtures/plugin-test/README.md renamed to .github/workflows/fixtures/plugin-test-minor-fail/README.md

File renamed without changes.

.github/workflows/fixtures/plugin-test/plugin-test.php renamed to .github/workflows/fixtures/plugin-test-minor-fail/plugin-test.php

File renamed without changes.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
=== Plugin Test ===
2+
Contributors: jazzsequence
3+
Tags: github actions, testing
4+
Requires at least: 5.8
5+
Tested up to: 6.6
6+
Stable tag: 1.0.0
7+
License: MIT
8+
License URI: https://opensource.org/licenses/MIT
9+
10+
This is a test plugin for testing GitHub Actions workflows.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Plugin Test
2+
Contributors: jazzsequence
3+
Tags: github actions, testing
4+
Requires at least: 5.8
5+
Tested up to: 6.6.1
6+
Stable tag: 1.0.0
7+
License: MIT
8+
License URI: https://opensource.org/licenses/MIT
9+
10+
This is a test plugin for testing GitHub Actions workflows.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?php
2+
/**
3+
* Plugin Name: Test Plugin
4+
* Plugin URI: https://github.com/jazzsequence/action-validate-plugin-version
5+
* Description: A test plugin for the GitHub Action to validate plugin version
6+
* Version: 1.0.0
7+
* Author: Chris Reynolds
8+
* Author URI: https://chrisreynolds.io
9+
* License: MIT License
10+
*/
11+
12+
// Silence is golden.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
=== Plugin Test ===
2+
Contributors: jazzsequence
3+
Tags: github actions, testing
4+
Requires at least: 5.8
5+
Tested up to: 6.8
6+
Stable tag: 1.0.0
7+
License: MIT
8+
License URI: https://opensource.org/licenses/MIT
9+
10+
This is a test plugin for testing GitHub Actions workflows.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Plugin Test
2+
Contributors: jazzsequence
3+
Tags: github actions, testing
4+
Requires at least: 5.8
5+
Tested up to: 6.6.1
6+
Stable tag: 1.0.0
7+
License: MIT
8+
License URI: https://opensource.org/licenses/MIT
9+
10+
This is a test plugin for testing GitHub Actions workflows.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?php
2+
/**
3+
* Plugin Name: Test Plugin
4+
* Plugin URI: https://github.com/jazzsequence/action-validate-plugin-version
5+
* Description: A test plugin for the GitHub Action to validate plugin version
6+
* Version: 1.0.0
7+
* Author: Chris Reynolds
8+
* Author URI: https://chrisreynolds.io
9+
* License: MIT License
10+
*/
11+
12+
// Silence is golden.

.github/workflows/fixtures/plugin-test/readme.txt renamed to .github/workflows/fixtures/plugin-test-patch-fail/readme.txt

File renamed without changes.

.github/workflows/test.yml

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,26 @@ on: [push, pull_request]
33
jobs:
44
test:
55
runs-on: ubuntu-latest
6-
strategy:
7-
matrix:
8-
validation-level: [minor, patch]
9-
name: Test Validation Level ${{ matrix.validation-level }}
6+
name: Test Validation Level
107
steps:
118
- uses: actions/checkout@v5
129
with:
1310
fetch-depth: 0
14-
- name: Validate Plugin Version
11+
- name: Validate Plugin Version (Patch - Fail)
1512
uses: ./
1613
with:
17-
plugin-path: '.github/workflows/fixtures/plugin-test/'
14+
plugin-path: '.github/workflows/fixtures/plugin-test-patch-fail/'
1815
dry-run: true
19-
validation-level: ${{ matrix.validation-level }}
16+
validation-level: patch
17+
- name: Validate Plugin Version (Minor - Fail)
18+
uses: ./
19+
with:
20+
plugin-path: '.github/workflows/fixtures/plugin-test-minor-fail/'
21+
dry-run: true
22+
validation-level: minor
23+
- name: Validate Plugin Version (Minor - Pass)
24+
uses: ./
25+
with:
26+
plugin-path: '.github/workflows/fixtures/plugin-test-minor-pass/'
27+
dry-run: true
28+
validation-level: minor

0 commit comments

Comments
 (0)