gh-action-bump-version/tests/end-to-end/config.yaml

230 lines
5.6 KiB
YAML
Raw Permalink Normal View History

2021-08-20 23:51:35 +00:00
suites:
- name: default
yaml:
name: Bump Version
on:
push:
jobs:
bump-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- id: version-bump
uses: ./action
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
tests:
- message: no keywords
expected:
version: 1.0.1
- message: feat
expected:
version: 1.1.0
- message: minor
expected:
version: 1.2.0
- message: BREAKING CHANGE
expected:
version: 2.0.0
- message: major
expected:
version: 3.0.0
- message: pre-alpha
expected:
version: 3.0.1-alpha.0
- message: pre-beta
expected:
version: 3.0.1-beta.0
- message: pre-rc
expected:
version: 3.0.1-rc.0
- name: no-push
yaml:
name: Do Nothing
on:
push:
jobs:
bump-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- id: version-bump
uses: ./action
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
push: false
tests:
- message: no keywords
expected:
version: 3.0.1-rc.0
- name: custom-wording
yaml:
name: Bump Version (Custom Wording)
on:
push:
jobs:
bump-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- id: version-bump
uses: ./action
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
minor-wording: custom-minor
major-wording: custom-major
rc-wording: custom-pre
tests:
- message: custom-minor
expected:
version: 3.1.0
- message: custom-major
expected:
version: 4.0.0
- message: custom-pre
expected:
version: 4.0.1-pre.0
- name: null-default
yaml:
name: Bump Version (Default="Minor")
on:
push:
jobs:
bump-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- id: version-bump
uses: ./action
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
2022-01-26 06:39:02 +00:00
default: null
2021-08-20 23:51:35 +00:00
patch-wording: patch
tests:
- message: no hint
expected:
2022-01-26 06:39:02 +00:00
version: 4.0.1-pre.0
2021-08-20 23:51:35 +00:00
- message: patch
expected:
version: 4.1.1
- name: custom-tag-prefix
yaml:
name: Bump Version (Custom Tag Prefix)
on:
push:
jobs:
bump-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- id: version-bump
uses: ./action
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag-prefix: 'v'
tests:
- message: no keywords
expected:
version: 4.1.2
tag: v4.1.2
2022-11-20 20:50:01 +00:00
- name: custom-tag-suffix
yaml:
name: Bump Version (Custom Tag Suffix)
on:
push:
jobs:
bump-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- id: version-bump
uses: ./action
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag-suffix: '-beta'
tests:
- message: no keywords
expected:
version: 4.1.2
tag: 4.1.2-beta
- name: custom-tag-prefix-with-suffix
yaml:
name: Bump Version (Custom Tag Prefix With Suffix)
on:
push:
jobs:
bump-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- id: version-bump
uses: ./action
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag-prefix: 'v'
tag-suffix: '-beta'
tests:
- message: no keywords
expected:
version: 4.1.2
tag: v4.1.2-beta
2021-09-09 04:25:16 +00:00
- name: target-branch
yaml:
name: Bump Version (Target Branch)
on:
push:
branches:
- main
jobs:
bump-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: git branch other-branch
- id: version-bump
uses: ./action
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
target-branch: other-branch
tests:
- message: no keywords
expected:
version: 4.1.3
branch: other-branch
- name: skip-commit
yaml:
name: Bump Version (Skip Commit)
on:
push:
jobs:
bump-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- id: version-bump
uses: ./action
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
skip-commit: true
tests:
- message: no keywords
expected:
version: 4.1.4
message: 'ci: version bump to 4.1.3'
2021-09-09 04:25:16 +00:00
2021-08-20 23:51:35 +00:00
actionFiles:
- index.js
- Dockerfile
- package.json
- package-lock.json
- action.yml
image: catthehacker/ubuntu:act-latest