Skip to content

.github/workflows/cloud-client-tests.yml #6593

.github/workflows/cloud-client-tests.yml

.github/workflows/cloud-client-tests.yml #6593

on:
pull_request:
push:
branches:
- main
workflow_dispatch:
schedule:
- cron: '46 * * * *'
jobs:
cloud-client-tests:
runs-on: ubuntu-24.04
strategy:
fail-fast: false
max-parallel: 1
matrix:
cloud-client-version:
- 'releases/latest'
- 'releases/6.1.3'
- 'main'
ucm-release-version:
- 'release%2F0.5.25'
- 'trunk-build'
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Restore cached ucm release
id: restore-cached-ucm
uses: actions/cache/restore@v4
with:
path: |
/opt/unisonlanguage
/usr/local/bin/ucm
key: ${{ runner.os }}-ucm-${{ matrix.ucm-release-version }}
- name: Install ucm
if: steps.restore-cached-ucm.outputs.cache-hit != 'true'
env:
UCM_RELEASE: ${{ matrix.ucm-release-version }}
run: ./install-ucm.sh
- name: Cache Unison codebase
id: cache-unison-codebase
uses: actions/cache@v4
with:
path: /var/lib/unison
key: unison-codebase-ucm_${{ matrix.ucm-release-version }}-cloud-client_${{ matrix.cloud-client-version }}
restore-keys: |
unison-codebase-ucm_${{ matrix.ucm-release-version }}-cloud-client_
- name: Run tests
env:
CLOUD_CLIENT_VERSION: ${{ matrix.cloud-client-version }}
UNISON_CLOUD_ACCESS_TOKEN: ${{ secrets.CLOUD_USER_ACCESS_TOKEN }}
UNISON_DEBUG: timing
run: |
apt-get update && apt-get -y install gettext-base
./run-tests.sh
- name: Slack notification
if: ${{ failure() }}
uses: slackapi/slack-github-action@v1.24.0
with:
channel-id: 'C02DSE7K3EF'
payload: |
{
"text": "Cloud client integration tests production ${{ job.status }} (version: ${{ matrix.cloud-client-version }}). ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "Cloud client integration tests production ${{ job.status }} (version: ${{ matrix.cloud-client-version }}). <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|Details>"
}
}
]
}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
- name: Cache ucm release
if: ${{ !cancelled() && steps.restore-cached-ucm.outputs.cache-hit != 'true' && startsWith(matrix.ucm-release-version, 'release') }}
id: save-ucm-to-cache
uses: actions/cache/save@v4
with:
path: |
/opt/unisonlanguage
/usr/local/bin/ucm
key: ${{ steps.restore-cached-ucm.outputs.cache-primary-key }}