Skip to content

fix: use warning for invalid path #83

fix: use warning for invalid path

fix: use warning for invalid path #83

Workflow file for this run

name: Test envr.ps1
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]
env:
COLOR_SUCCESS: 1e6e18
COLOR_FAIL: c31f1d
jobs:
test_bash_on_ubuntu:
runs-on: ubuntu-latest
env:
color: c31f1d
steps:
- uses: actions/checkout@v3
- name: Get version
run: echo "version=${BASH_VERSION}" >> $GITHUB_ENV
- name: Test bash on Ubuntu
run: tests/sh/bash.sh
- name: Set success color
if: success()
run: echo "color=${{ env.COLOR_SUCCESS }}" >> $GITHUB_ENV
- name: Make badge
if: success() || failure()
uses: RubbaBoy/[email protected]
with:
NAME: ubuntu_bash
LABEL: bash
STATUS: ${{ env.version }}
COLOR: ${{ env.color }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
test_zsh_on_ubuntu:
runs-on: ubuntu-latest
env:
color: c31f1d
steps:
- uses: actions/checkout@v3
- name: Install zsh
run: sudo apt update && sudo apt install zsh -y
- name: Get version
run: echo "version=$(zsh --version)" >> $GITHUB_ENV
- name: Test zsh on Ubuntu
run: tests/sh/zsh.sh
- name: Set success color
if: success()
run: echo "color=${{ env.COLOR_SUCCESS }}" >> $GITHUB_ENV
- name: Make badge
if: success() || failure()
uses: RubbaBoy/[email protected]
with:
NAME: ubuntu_zsh
LABEL: zsh
STATUS: ${{ env.version }}
COLOR: ${{ env.color }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
test_ps_core_on_windows:
runs-on: windows-latest
outputs:
color: ${{ steps.set-success-color.outputs.color }}
version: ${{ steps.get-version.outputs.version }}
steps:
- uses: actions/checkout@v3
- id: get-version
shell: pwsh
run: $($_v = $PSVersionTable.PSVersion; echo version=$_v) >> $env:GITHUB_OUTPUT
- name: Test PS Core on Windows
shell: pwsh
run: ./tests/windows/ps.ps1
- id: set-success-color
if: success()
run: echo "color=${{ env.COLOR_SUCCESS }}" >> $env:GITHUB_OUTPUT
test_ps_on_windows:
runs-on: windows-latest
outputs:
color: ${{ steps.set-success-color.outputs.color }}
version: ${{ steps.get-version.outputs.version }}
steps:
- uses: actions/checkout@v3
- id: get-version
shell: powershell
run: $($_v = $PSVersionTable.PSVersion; echo version=$_v) >> $env:GITHUB_OUTPUT
- name: Test PS on Windows
shell: powershell
run: ./tests/windows/ps.ps1
- id: set-success-color
if: success()
run: echo "color=${{ env.COLOR_SUCCESS }}" >> $env:GITHUB_OUTPUT
test_bash_on_mac:
runs-on: macos-latest
outputs:
color: ${{ steps.set-success-color.outputs.color }}
version: ${{ steps.get-version.outputs.version }}
steps:
- uses: actions/checkout@v3
- id: get-version
run: echo "version=${BASH_VERSION}" >> $GITHUB_OUTPUT
- name: Test bash on MacOS
run: tests/sh/bash.sh
- id: set-success-color
if: success()
run: echo "color=${{ env.COLOR_SUCCESS }}" >> $GITHUB_OUTPUT
test_zsh_on_mac:
runs-on: macos-latest
outputs:
color: ${{ steps.set-success-color.outputs.color }}
version: ${{ steps.get-version.outputs.version }}
steps:
- uses: actions/checkout@v3
- id: get-version
run: echo "version=$(zsh --version)" >> $GITHUB_OUTPUT
- name: Test zsh on MacOS
run: tests/sh/zsh.sh
- id: set-success-color
if: success()
run: echo "color=${{ env.COLOR_SUCCESS }}" >> $GITHUB_OUTPUT
make_badges:
if: always()
runs-on: ubuntu-latest
needs: [test_ps_on_windows, test_ps_core_on_windows, test_bash_on_mac, test_zsh_on_mac]
steps:
- uses: actions/checkout@v3
- name: Make Windows PS Core Badge
uses: RubbaBoy/[email protected]
with:
NAME: windows_ps_core
LABEL: PowerShell
STATUS: ${{ needs.test_ps_core_on_windows.outputs.version }}
COLOR: ${{ needs.test_ps_core_on_windows.outputs.color }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Make Windows PS Badge
uses: RubbaBoy/[email protected]
with:
NAME: windows_ps
LABEL: PowerShell
STATUS: ${{ needs.test_ps_on_windows.outputs.version }}
COLOR: ${{ needs.test_ps_on_windows.outputs.color }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Make MacOS bash Badge
uses: RubbaBoy/[email protected]
with:
NAME: mac_bash
LABEL: bash
STATUS: ${{ needs.test_bash_on_mac.outputs.version }}
COLOR: ${{ needs.test_bash_on_mac.outputs.color }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Make MacOS zsh Badge
uses: RubbaBoy/[email protected]
with:
NAME: mac_zsh
LABEL: zsh
STATUS: ${{ needs.test_zsh_on_mac.outputs.version }}
COLOR: ${{ needs.test_zsh_on_mac.outputs.color }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}