Skip to content

Commit

Permalink
Added test config file and gh workflow testing github action.
Browse files Browse the repository at this point in the history
  • Loading branch information
WyvernIXTL committed Jun 26, 2024
1 parent 537962d commit 59807c7
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: CI

on:
push:
branches:
- main
workflow_dispatch:

jobs:
test:
name: Test Github Action
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Test Install
uses: ./action.yaml
with:
path: ./tests/
options: --something
- name: Assert Output
shell: pwsh
run: if ( !( (get-content ./cool.sh) -match "echo something" ) ) { exit 1 }

test2:
name: Test Github Action 2
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Test Install
uses: ./action.yaml
with:
path: ./tests/
version: 0.4.0
- name: Assert Output
shell: pwsh
run: if ( !( (get-content ./cool.sh) -match "echo nothing" ) ) { exit 1 }
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cool.sh
15 changes: 15 additions & 0 deletions tests/install.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
$schema: https://json-schema.org/draft/2020-12/schema
$id: https://github.com/instructions-d-installation/installation-instruction-action/tests/install.cfg
name: test-action
type: object
properties:
something:
type: boolean
default: false

------------------------------------------------------------------------------------------------------
{%- if something %}
echo echo something >> cool.sh
{%- else %}
echo echo nothing >> cool.sh
{%- endif %}

0 comments on commit 59807c7

Please sign in to comment.