Skip to content

ci: Fix parameter name #25

ci: Fix parameter name

ci: Fix parameter name #25

Workflow file for this run

name: "Test Action"
on:
push:
branches:
- "**"
jobs:
test-unit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
with:
node-version: 16
- run: npm install
- name: Run unit tests
run: npm run test
test-integration:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
with:
node-version: 16
- name: Install Javascript dependencies using npm
if: ${{ github.ref != 'refs/heads/release' }}
run: npm install
- name: Package action for integration tests
if: ${{ github.ref != 'refs/heads/release' }}
run: npm run package
- id: major
uses: ./
with:
version: "3.14.1"
major: true
minor: false
patch: false
- name: Test major version is provided as alias
uses: prompt/actions-assert@v1
with:
assertion: npm://@assertions/is-equal
expected: "v3"
actual: "${{ steps.major.outputs.csv }}"
- id: minor
uses: ./
with:
version: "3.14.1"
major: false
minor: true
patch: false
- name: Test minor version is provided as alias
uses: prompt/actions-assert@v1
with:
assertion: npm://@assertions/is-equal
expected: "v3.14"
actual: "${{ steps.minor.outputs.csv }}"
- id: patch
uses: ./
with:
version: "3.14.1"
major: false
minor: false
patch: true
- name: Test patch version is provided as alias
uses: prompt/actions-assert@v1
with:
assertion: npm://@assertions/is-equal
expected: "v3.14.1"
actual: "${{ steps.patch.outputs.csv }}"
- id: all
uses: ./
with:
version: "3.14.1"
major: true
minor: true
patch: true
- name: Test all versions are provided as aliases
uses: prompt/actions-assert@v1
with:
assertion: npm://@assertions/is-equal
expected: "v3,v3.14,v3.14.1"
actual: "${{ steps.all.outputs.csv }}"
- name: Test list provides new-line separated aliases
uses: prompt/actions-assert@v1
with:
assertion: npm://@assertions/is-equal
expected: |
v3
v3.14
v3.14.1
actual: "${{ steps.all.outputs.list }}"
- id: none
uses: ./
with:
version: "3.14.1"
major: false
minor: false
patch: false
- name: Test no versions are provided as aliases
uses: prompt/actions-assert@v1
with:
assertion: npm://@assertions/is-equal
expected: ""
actual: "${{ steps.none.outputs.csv }}"
- id: prefixed
uses: ./
with:
version: "3.14.1"
major: true
minor: true
patch: true
- name: Test all version aliases are prefixed
uses: prompt/actions-assert@v1
with:
assertion: npm://@assertions/starts-with
each: true
expected: "v"
actual: "${{ steps.prefixed.outputs.list }}"