Skip to content

Add Leap 15.6

Add Leap 15.6 #1084

name: Test install instructions
on:
workflow_dispatch:
push:
schedule:
- cron: '5 16 * * *'
env:
RED_PACKAGE_NAME: |-
${{
github.ref_name == 'dev' && 'https://github.com/Cog-Creators/Red-DiscordBot/tarball/V3/develop#egg=Red-DiscordBot'
|| startsWith(github.ref_name, 'pull/') && format(
'https://github.com/Cog-Creators/Red-DiscordBot/tarball/refs/{0}/merge#egg=Red-DiscordBot',
github.ref_name
)
|| 'Red-DiscordBot'
}}
jobs:
install:
strategy:
fail-fast: false
matrix:
include:
# macOS
#
# 1. remove python@3 and python@3.* executables before performing steps in GH Actions only
- os: macos-12
run: |-
rm -f /usr/local/bin/{2to3{,-3.*},{idle3,pydoc3}{,.*},python3{,.*}{,-config}}
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew_location="$([ -n "$HOMEBREW_PREFIX" ] && echo "$HOMEBREW_PREFIX" || ([ "$(/usr/bin/uname -m)" = "arm64" ] && echo /opt/homebrew || echo /usr/local))/bin/brew"
printf '\neval "$(%s shellenv)"\n' "$brew_location" >> "$([ -n "$ZSH_VERSION" ] && echo ~/.zprofile || ([ -f ~/.bash_profile ] && echo ~/.bash_profile || echo ~/.profile))"
eval "$("$brew_location" shellenv)"
brew install python@3.11
brew install git
brew install temurin@17
echo 'export PATH="$(brew --prefix)/opt/python@3.11/bin:$PATH"' >> "$([ -n "$ZSH_VERSION" ] && echo ~/.zprofile || ([ -f ~/.bash_profile ] && echo ~/.bash_profile || echo ~/.profile))"
export PATH="$(brew --prefix)/opt/python@3.11/bin:$PATH"
venv_method: "venv311"
- os: macos-13
run: |-
rm -f /usr/local/bin/{2to3{,-3.*},{idle3,pydoc3}{,.*},python3{,.*}{,-config}}
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew_location="$([ -n "$HOMEBREW_PREFIX" ] && echo "$HOMEBREW_PREFIX" || ([ "$(/usr/bin/uname -m)" = "arm64" ] && echo /opt/homebrew || echo /usr/local))/bin/brew"
printf '\neval "$(%s shellenv)"\n' "$brew_location" >> "$([ -n "$ZSH_VERSION" ] && echo ~/.zprofile || ([ -f ~/.bash_profile ] && echo ~/.bash_profile || echo ~/.profile))"
eval "$("$brew_location" shellenv)"
brew install python@3.11
brew install git
brew install temurin@17
echo 'export PATH="$(brew --prefix)/opt/python@3.11/bin:$PATH"' >> "$([ -n "$ZSH_VERSION" ] && echo ~/.zprofile || ([ -f ~/.bash_profile ] && echo ~/.bash_profile || echo ~/.profile))"
export PATH="$(brew --prefix)/opt/python@3.11/bin:$PATH"
venv_method: "venv311"
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
container: ${{ matrix.container }}
env:
DEBIAN_FRONTEND: noninteractive
steps:
# Clone Red-Install-Tests repository
- uses: actions/checkout@v3
# Installing requirements
- name: Run install instructions (Linux/Mac)
id: install_linux
run: ${{ matrix.run }}
if: >-
runner.os != 'Windows'
shell: bash -leo pipefail {0}
# Making a virtual environment and installing Red
- name: Install Red inside venv on Python 3.11 (Linux/Mac)
if: >-
matrix.venv_method == 'venv311'
shell: bash -leo pipefail {0}
run: |-
python3.11 -m venv ~/redenv
source ~/redenv/bin/activate
python -m pip install -U pip setuptools wheel
python -m pip install -U "$RED_PACKAGE_NAME"
# we skip checking Java version because GitHub Actions environment
# will take precedence over whatever we do here
- name: Run tests inside venv on Python 3.11.
if: >-
matrix.venv_method == 'venv311'
shell: bash -leo pipefail {0}
run: |-
source ~/redenv/bin/activate
python ./run_tests.py