Bump typescript from 5.3.2 to 5.3.3 #140
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Tests | |
on: | |
push: | |
branches: [ main ] | |
paths: | |
- 'dist/*.js' | |
- '.github/workflows/tests.yml' | |
pull_request: | |
branches: [ main ] | |
jobs: | |
test: | |
name: Test Action | |
strategy: | |
matrix: | |
os: | |
- macos-11 | |
- macos-12 | |
- macos-latest | |
- ubuntu-20.04 | |
- ubuntu-22.04 | |
- ubuntu-latest | |
- windows-2019 | |
- windows-2022 | |
- windows-latest | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Generate action code | |
if: ${{ github.event_name == 'pull_request' }} | |
uses: ./.github/actions/generate-action-code | |
- uses: sersoft-gmbh/os-version-action@main | |
if: ${{ github.event_name == 'push' }} | |
id: os-version-main | |
- uses: './' | |
if: ${{ github.event_name == 'pull_request' }} | |
id: os-version-local | |
- id: os-version | |
env: | |
EVENT_NAME: ${{ github.event_name }} | |
BRANCH_VERSION: ${{ steps.os-version-main.outputs.version }} | |
LOCAL_VERSION: ${{ steps.os-version-local.outputs.version }} | |
run: | | |
if [ "${EVENT_NAME}" == 'push' ]; then | |
echo "version=${BRANCH_VERSION}" >> "${GITHUB_OUTPUT}" | |
else | |
echo "version=${LOCAL_VERSION}" >> "${GITHUB_OUTPUT}" | |
fi | |
shell: bash | |
- name: Check for reported version | |
if: ${{ runner.os == 'Linux' }} | |
env: | |
DETECTED_VERSION: ${{ steps.os-version.outputs.version }} | |
run: lsb_release -sr | grep -q "${DETECTED_VERSION}" | |
shell: bash | |
- name: Check for reported version | |
if: ${{ runner.os == 'macOS' }} | |
env: | |
DETECTED_VERSION: ${{ steps.os-version.outputs.version }} | |
run: sw_vers -productVersion | grep -q "${DETECTED_VERSION}" | |
shell: bash | |
- name: Check for reported version | |
if: ${{ runner.os == 'Windows' }} | |
env: | |
DETECTED_VERSION: ${{ steps.os-version.outputs.version }} | |
run: | | |
EXPECTED_VERSION=$(systeminfo | grep -oE '^OS Name: +[A-Za-z0-9 .]+' | grep -oE '[0-9.]+') | |
if [ "${EXPECTED_VERSION}" = '' ]; then | |
EXPECTED_VERSION="$(pwsh -Command '[System.Environment]::OSVersion.Version.Major').$(pwsh -Command '[System.Environment]::OSVersion.Version.Minor')" | |
fi | |
echo "Expecting: ${EXPECTED_VERSION}" | |
echo "${EXPECTED_VERSION}" | grep -q "${DETECTED_VERSION}" | |
shell: bash | |
test-container: | |
name: Test Action using Container | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
container: # Ubuntu containers don't have `lsb_release` installed | |
- ubuntu:20.04 | |
- ubuntu:22.04 | |
container: ${{ matrix.container }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Generate action code | |
if: ${{ github.event_name == 'pull_request' }} | |
uses: ./.github/actions/generate-action-code | |
- uses: sersoft-gmbh/os-version-action@main | |
if: ${{ github.event_name == 'push' }} | |
id: os-version-main | |
- uses: './' | |
if: ${{ github.event_name == 'pull_request' }} | |
id: os-version-local | |
- id: os-version | |
env: | |
EVENT_NAME: ${{ github.event_name }} | |
BRANCH_VERSION: ${{ steps.os-version-main.outputs.version }} | |
LOCAL_VERSION: ${{ steps.os-version-local.outputs.version }} | |
run: | | |
if [ "${EVENT_NAME}" == 'push' ]; then | |
echo "version=${BRANCH_VERSION}" >> "${GITHUB_OUTPUT}" | |
else | |
echo "version=${LOCAL_VERSION}" >> "${GITHUB_OUTPUT}" | |
fi | |
shell: bash | |
- name: Check for reported version | |
env: | |
CONTAINER: ${{ matrix.container }} | |
DETECTED_VERSION: ${{ steps.os-version.outputs.version }} | |
run: test "${DETECTED_VERSION}" = "${CONTAINER#*:}" | |
shell: bash |