Skip to content

Nightly rad CLI tests #127

Nightly rad CLI tests

Nightly rad CLI tests #127

Workflow file for this run

name: Nightly rad CLI tests
on:
schedule:
# Run every day at 11:47 PM UTC
- cron: '47 23 * * *'
workflow_dispatch:
pull_request:
types: [opened, synchronize, reopened]
paths:
- .github/workflows/test.yaml
jobs:
download:
runs-on: ubuntu-latest
if: github.repository == 'radius-project/radius'
strategy:
matrix:
include:
- os: linux
arch: amd64
file: rad
- os: linux
arch: arm64
file: rad
- os: linux
arch: arm
file: rad
- os: darwin
arch: amd64
file: rad
- os: darwin
arch: arm64
file: rad
- os: windows
arch: amd64
file: rad
ext: .exe
steps:
- name: Get latest version
run: |
radReleaseUrl="https://api.github.com/repos/radius-project/radius/releases"
echo "RAD_VERSION=$(curl -s ${radReleaseUrl} | grep \"tag_name\" | grep -v rc | awk 'NR==1{print $2}' | sed -n 's/\"\(.*\)\",/\1/p')" >> $GITHUB_ENV
- name: Download file
run: curl -sSLI -w "%{http_code}" "https://github.com/radius-project/radius/releases/download/${{ env.RAD_VERSION }}/${{ matrix.file }}_${{ matrix.os }}_${{ matrix.arch }}${{ matrix.ext }}" --fail-with-body -o "${{ matrix.file }}_${{ matrix.os }}_${{ matrix.arch }}${{ matrix.ext }}"
- name: Test Linux x64
if: ${{ matrix.os == 'linux' && matrix.arch == 'x64' }}
run: |
chmod +x ./${{ matrix.file }}_${{ matrix.os }}_${{ matrix.arch }}${{ matrix.ext }}
./${{ matrix.file }}_${{ matrix.os }}_${{ matrix.arch }}${{ matrix.ext }} version
- name: Create GitHub issue on failure
if: ${{ failure() }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh issue create --title "CLI nightly test failed - ${{ matrix.os }}-${{ matrix.arch }}" --body "Test failed on ${{ github.repository }} for ${{ matrix.os }}-${{ matrix.arch }}. See [workflow logs](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) for more details." --repo ${{ github.repository }}