Skip to content

[AUTO] Update generated code #299

[AUTO] Update generated code

[AUTO] Update generated code #299

Workflow file for this run

name: Tests
on:
push:
branches: [ main ]
paths:
- 'dist/*.js'
- '.github/workflows/tests.yml'
pull_request:
branches: [ main ]
jobs:
test-release:
name: Test Release Installation
strategy:
matrix:
swift-version: [ '5.7', '5.8.1' ]
os-version: [ 'ubuntu-22.04' ]
include:
- swift-version: '5.6'
os-version: ubuntu-20.04
runs-on: ${{ matrix.os-version }}
steps:
- uses: actions/checkout@v4
- name: Generate action code
if: ${{ github.event_name == 'pull_request' }}
uses: ./.github/actions/generate-action-code
- uses: sersoft-gmbh/swifty-linux-action@main
if: ${{ github.event_name == 'push' }}
id: install-swift-main
with:
release-version: ${{ matrix.swift-version }}
platform: ${{ matrix.os-version }}
github-token: ${{ github.token }}
- uses: './'
if: ${{ github.event_name == 'pull_request' }}
id: install-swift-local
with:
release-version: ${{ matrix.swift-version }}
platform: ${{ matrix.os-version }}
github-token: ${{ github.token }}
- id: install-swift
env:
EVENT_NAME: ${{ github.event_name }}
BRANCH_INSTALL_PATH: ${{ steps.install-swift-main.outputs.install-path }}
LOCAL_INSTALL_PATH: ${{ steps.install-swift-local.outputs.install-path }}
run: |
if [ "${EVENT_NAME}" == 'push' ]; then
echo "install-path=${BRANCH_INSTALL_PATH}" >> "${GITHUB_OUTPUT}"
else
echo "install-path=${LOCAL_INSTALL_PATH}" >> "${GITHUB_OUTPUT}"
fi
- name: Check installed path
env:
INSTALL_PATH: ${{ steps.install-swift.outputs.install-path }}
run: test -d "${INSTALL_PATH}"
- name: Check installed version
env:
EXPECTED_VERSION: ${{ matrix.swift-version }}
run: swift --version | grep -q "${EXPECTED_VERSION}"
test-branch:
name: Test Branch Installation
strategy:
matrix:
swift-version: [ '5.7', '5.8.1' ]
os-version: [ 'ubuntu-22.04' ]
include:
- swift-version: '5.6'
os-version: ubuntu-20.04
runs-on: ${{ matrix.os-version }}
steps:
- uses: actions/checkout@v4
- name: Generate action code
if: ${{ github.event_name == 'pull_request' }}
uses: ./.github/actions/generate-action-code
- uses: sersoft-gmbh/swifty-linux-action@main
if: ${{ github.event_name == 'push' }}
id: install-swift-main
with:
branch-name: swift-${{ matrix.swift-version }}-release
version-tag: swift-${{ matrix.swift-version }}-RELEASE
platform: ${{ matrix.os-version }}
- uses: './'
if: ${{ github.event_name == 'pull_request' }}
id: install-swift-local
with:
branch-name: swift-${{ matrix.swift-version }}-release
version-tag: swift-${{ matrix.swift-version }}-RELEASE
platform: ${{ matrix.os-version }}
- id: install-swift
env:
EVENT_NAME: ${{ github.event_name }}
BRANCH_INSTALL_PATH: ${{ steps.install-swift-main.outputs.install-path }}
LOCAL_INSTALL_PATH: ${{ steps.install-swift-local.outputs.install-path }}
run: |
if [ "${EVENT_NAME}" == 'push' ]; then
echo "install-path=${BRANCH_INSTALL_PATH}" >> "${GITHUB_OUTPUT}"
else
echo "install-path=${LOCAL_INSTALL_PATH}" >> "${GITHUB_OUTPUT}"
fi
- name: Check installed path
env:
INSTALL_PATH: ${{ steps.install-swift.outputs.install-path }}
run: test -d "${INSTALL_PATH}"
- name: Check installed version
env:
EXPECTED_VERSION: ${{ matrix.swift-version }}
run: swift --version | grep -q "${EXPECTED_VERSION}"
test-release-noplatform:
name: Test Release Installation w/o Platform
strategy:
matrix:
os-version: [ 'ubuntu-22.04', 'ubuntu-20.04' ]
env:
INPUT_SWIFT_VERSION: '5.8'
runs-on: ${{ matrix.os-version }}
steps:
- uses: actions/checkout@v4
- name: Generate action code
if: ${{ github.event_name == 'pull_request' }}
uses: ./.github/actions/generate-action-code
- uses: sersoft-gmbh/swifty-linux-action@main
if: ${{ github.event_name == 'push' }}
id: install-swift-main
with:
release-version: ${{ env.INPUT_SWIFT_VERSION }}
github-token: ${{ secrets.GITHUB_TOKEN }}
- uses: './'
if: github.event_name == 'pull_request'
id: install-swift-local
with:
release-version: ${{ env.INPUT_SWIFT_VERSION }}
github-token: ${{ secrets.GITHUB_TOKEN }}
- id: install-swift
env:
EVENT_NAME: ${{ github.event_name }}
BRANCH_INSTALL_PATH: ${{ steps.install-swift-main.outputs.install-path }}
LOCAL_INSTALL_PATH: ${{ steps.install-swift-local.outputs.install-path }}
run: |
if [ "${EVENT_NAME}" == 'push' ]; then
echo "install-path=${BRANCH_INSTALL_PATH}" >> "${GITHUB_OUTPUT}"
else
echo "install-path=${LOCAL_INSTALL_PATH}" >> "${GITHUB_OUTPUT}"
fi
- name: Check installed path
env:
INSTALL_PATH: ${{ steps.install-swift.outputs.install-path }}
run: test -d "${INSTALL_PATH}"
- name: Check installed version
run: swift --version | grep -q "${INPUT_SWIFT_VERSION}"