Skip to content

Commit

Permalink
Create test workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
Raild3x committed Feb 6, 2025
1 parent 56119b4 commit 9b5ac08
Show file tree
Hide file tree
Showing 2 changed files with 77 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/env.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
on:
workflow_call:
inputs:
version:
type: string
required: false
path:
type: string
default: "."
required: false
cache:
type: string
default: "true"
required: false

jobs:
test-env:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4

- name: Create manifest file
run: |
cat > ${{ inputs.path }}/rokit.toml << EOF
[tools]
selene = "Kampfkarren/[email protected]"
stylua = "JohnnyMorganz/[email protected]"
rojo = "rojo-rbx/[email protected]"
EOF
shell: bash

- name: Run setup-rokit
uses: ./
with:
version: ${{ inputs.version }}
path: ${{ inputs.path }}
cache: ${{ inputs.cache }}

- name: Verify executables in PATH on bash
run: |
command -v selene
command -v stylua
command -v rojo
shell: bash

- name: Verify executables in PATH on pwsh
run: |
Get-Command "selene"
Get-Command "stylua"
Get-Command "rojo"
shell: pwsh
23 changes: 23 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: test
on:
workflow_dispatch:
push:
paths:
- "**.yml"
pull_request:
paths:
- "**.yml"

defaults:
run:
shell: bash

jobs:
test-cache:
uses: ./.github/workflows/env.yml
with:
cache: "true"
test-no-cache:
uses: ./.github/workflows/env.yml
with:
cache: "false"

0 comments on commit 9b5ac08

Please sign in to comment.