116 lines
2.6 KiB
YAML
116 lines
2.6 KiB
YAML
name: 'Action to test the action locally with act'
|
|
on:
|
|
push:
|
|
branches:
|
|
- branch-that-does-not-exist
|
|
|
|
jobs:
|
|
test-json:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v2
|
|
with:
|
|
path: "./"
|
|
|
|
- name: Generate changelog
|
|
id: changelog
|
|
uses: ./
|
|
env:
|
|
ENV: 'dont-use-git'
|
|
with:
|
|
github-token: ${{ secrets.github_token }}
|
|
|
|
test-pre-commit:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v2
|
|
with:
|
|
path: "./"
|
|
|
|
- run: test -f pre-commit.test.json && (echo should not be here yet && exit 1) || exit 0
|
|
|
|
- name: Generate changelog
|
|
id: changelog
|
|
uses: ./
|
|
env:
|
|
ENV: 'dont-use-git'
|
|
with:
|
|
github-token: ${{ secrets.github_token }}
|
|
pre-commit: test/pre-commit.js
|
|
skip-on-empty: 'false'
|
|
|
|
- run: test -f pre-commit.test.json || (echo should be here && exit 1)
|
|
- run: cat pre-commit.test.json
|
|
|
|
test-git:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v2
|
|
with:
|
|
path: "./"
|
|
|
|
- name: Generate changelog
|
|
id: changelog
|
|
uses: ./
|
|
env:
|
|
ENV: 'dont-use-git'
|
|
with:
|
|
github-token: ${{ secrets.github_token }}
|
|
skip-commit: 'true'
|
|
|
|
test-yaml:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v2
|
|
with:
|
|
path: "./"
|
|
|
|
- name: Generate changelog
|
|
id: changelog
|
|
uses: ./
|
|
env:
|
|
ENV: 'dont-use-git'
|
|
with:
|
|
github-token: ${{ secrets.github_token }}
|
|
version-file: 'test-file.yaml'
|
|
version-path: 'package.version'
|
|
|
|
test-toml:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v2
|
|
with:
|
|
path: "./"
|
|
|
|
- name: Generate changelog
|
|
id: changelog
|
|
uses: ./
|
|
env:
|
|
ENV: 'dont-use-git'
|
|
with:
|
|
github-token: ${{ secrets.github_token }}
|
|
version-file: 'test-file.toml'
|
|
version-path: 'package.version'
|
|
|
|
test-multiple-files:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v2
|
|
with:
|
|
path: "./"
|
|
|
|
- name: Generate changelog
|
|
id: changelog
|
|
uses: ./
|
|
env:
|
|
ENV: 'dont-use-git'
|
|
with:
|
|
github-token: ${{ secrets.github_token }}
|
|
version-file: 'package.json, package-lock.json'
|