Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/actions/checkout/releases">actions/checkout's releases</a>.</em></p> <blockquote> <h2>v4.0.0</h2> <h2>What's Changed</h2> <ul> <li>Update default runtime to node20 by <a href="https://github.com/takost"><code>@takost</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1436">actions/checkout#1436</a></li> <li>Support fetching without the --progress option by <a href="https://github.com/simonbaird"><code>@simonbaird</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1067">actions/checkout#1067</a></li> <li>Release 4.0.0 by <a href="https://github.com/takost"><code>@takost</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1447">actions/checkout#1447</a></li> </ul> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/takost"><code>@takost</code></a> made their first contribution in <a href="https://redirect.github.com/actions/checkout/pull/1436">actions/checkout#1436</a></li> <li><a href="https://github.com/simonbaird"><code>@simonbaird</code></a> made their first contribution in <a href="https://redirect.github.com/actions/checkout/pull/1067">actions/checkout#1067</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/actions/checkout/compare/v3...v4.0.0">https://github.com/actions/checkout/compare/v3...v4.0.0</a></p> <h2>v3.6.0</h2> <h2>What's Changed</h2> <ul> <li>Mark test scripts with Bash'isms to be run via Bash by <a href="https://github.com/dscho"><code>@dscho</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1377">actions/checkout#1377</a></li> <li>Add option to fetch tags even if fetch-depth > 0 by <a href="https://github.com/RobertWieczoreck"><code>@RobertWieczoreck</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/579">actions/checkout#579</a></li> <li>Release 3.6.0 by <a href="https://github.com/luketomlinson"><code>@luketomlinson</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1437">actions/checkout#1437</a></li> </ul> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/RobertWieczoreck"><code>@RobertWieczoreck</code></a> made their first contribution in <a href="https://redirect.github.com/actions/checkout/pull/579">actions/checkout#579</a></li> <li><a href="https://github.com/luketomlinson"><code>@luketomlinson</code></a> made their first contribution in <a href="https://redirect.github.com/actions/checkout/pull/1437">actions/checkout#1437</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/actions/checkout/compare/v3.5.3...v3.6.0">https://github.com/actions/checkout/compare/v3.5.3...v3.6.0</a></p> <h2>v3.5.3</h2> <h2>What's Changed</h2> <ul> <li>Fix: Checkout Issue in self hosted runner due to faulty submodule check-ins by <a href="https://github.com/megamanics"><code>@megamanics</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1196">actions/checkout#1196</a></li> <li>Fix typos found by codespell by <a href="https://github.com/DimitriPapadopoulos"><code>@DimitriPapadopoulos</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1287">actions/checkout#1287</a></li> <li>Add support for sparse checkouts by <a href="https://github.com/dscho"><code>@dscho</code></a> and <a href="https://github.com/dfdez"><code>@dfdez</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1369">actions/checkout#1369</a></li> <li>Release v3.5.3 by <a href="https://github.com/TingluoHuang"><code>@TingluoHuang</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1376">actions/checkout#1376</a></li> </ul> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/megamanics"><code>@megamanics</code></a> made their first contribution in <a href="https://redirect.github.com/actions/checkout/pull/1196">actions/checkout#1196</a></li> <li><a href="https://github.com/DimitriPapadopoulos"><code>@DimitriPapadopoulos</code></a> made their first contribution in <a href="https://redirect.github.com/actions/checkout/pull/1287">actions/checkout#1287</a></li> <li><a href="https://github.com/dfdez"><code>@dfdez</code></a> made their first contribution in <a href="https://redirect.github.com/actions/checkout/pull/1369">actions/checkout#1369</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/actions/checkout/compare/v3...v3.5.3">https://github.com/actions/checkout/compare/v3...v3.5.3</a></p> <h2>v3.5.2</h2> <h2>What's Changed</h2> <ul> <li>Fix: Use correct API url / endpoint in GHES by <a href="https://github.com/fhammerl"><code>@fhammerl</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1289">actions/checkout#1289</a> based on <a href="https://redirect.github.com/actions/checkout/issues/1286">#1286</a> by <a href="https://github.com/1newsr"><code>@1newsr</code></a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/actions/checkout/compare/v3.5.1...v3.5.2">https://github.com/actions/checkout/compare/v3.5.1...v3.5.2</a></p> <h2>v3.5.1</h2> <h2>What's Changed</h2> <ul> <li>Improve checkout performance on Windows runners by upgrading <code>@actions/github</code> dependency by <a href="https://github.com/BrettDong"><code>@BrettDong</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1246">actions/checkout#1246</a></li> </ul> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/BrettDong"><code>@BrettDong</code></a> made their first contribution in <a href="https://redirect.github.com/actions/checkout/pull/1246">actions/checkout#1246</a></li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/actions/checkout/blob/main/CHANGELOG.md">actions/checkout's changelog</a>.</em></p> <blockquote> <h1>Changelog</h1> <h2>v4.0.0</h2> <ul> <li><a href="https://redirect.github.com/actions/checkout/pull/1067">Support fetching without the --progress option</a></li> <li><a href="https://redirect.github.com/actions/checkout/pull/1436">Update to node20</a></li> </ul> <h2>v3.6.0</h2> <ul> <li><a href="https://redirect.github.com/actions/checkout/pull/1377">Fix: Mark test scripts with Bash'isms to be run via Bash</a></li> <li><a href="https://redirect.github.com/actions/checkout/pull/579">Add option to fetch tags even if fetch-depth > 0</a></li> </ul> <h2>v3.5.3</h2> <ul> <li><a href="https://redirect.github.com/actions/checkout/pull/1196">Fix: Checkout fail in self-hosted runners when faulty submodule are checked-in</a></li> <li><a href="https://redirect.github.com/actions/checkout/pull/1287">Fix typos found by codespell</a></li> <li><a href="https://redirect.github.com/actions/checkout/pull/1369">Add support for sparse checkouts</a></li> </ul> <h2>v3.5.2</h2> <ul> <li><a href="https://redirect.github.com/actions/checkout/pull/1289">Fix api endpoint for GHES</a></li> </ul> <h2>v3.5.1</h2> <ul> <li><a href="https://redirect.github.com/actions/checkout/pull/1246">Fix slow checkout on Windows</a></li> </ul> <h2>v3.5.0</h2> <ul> <li><a href="https://redirect.github.com/actions/checkout/pull/1237">Add new public key for known_hosts</a></li> </ul> <h2>v3.4.0</h2> <ul> <li><a href="https://redirect.github.com/actions/checkout/pull/1209">Upgrade codeql actions to v2</a></li> <li><a href="https://redirect.github.com/actions/checkout/pull/1210">Upgrade dependencies</a></li> <li><a href="https://redirect.github.com/actions/checkout/pull/1225">Upgrade <code>@actions/io</code></a></li> </ul> <h2>v3.3.0</h2> <ul> <li><a href="https://redirect.github.com/actions/checkout/pull/1045">Implement branch list using callbacks from exec function</a></li> <li><a href="https://redirect.github.com/actions/checkout/pull/1050">Add in explicit reference to private checkout options</a></li> <li>[Fix comment typos (that got added in <a href="https://redirect.github.com/actions/checkout/issues/770">#770</a>)](<a href="https://redirect.github.com/actions/checkout/pull/1057">actions/checkout#1057</a>)</li> </ul> <h2>v3.2.0</h2> <ul> <li><a href="https://redirect.github.com/actions/checkout/pull/942">Add GitHub Action to perform release</a></li> <li><a href="https://redirect.github.com/actions/checkout/pull/967">Fix status badge</a></li> <li><a href="https://redirect.github.com/actions/checkout/pull/1002">Replace datadog/squid with ubuntu/squid Docker image</a></li> <li><a href="https://redirect.github.com/actions/checkout/pull/964">Wrap pipeline commands for submoduleForeach in quotes</a></li> <li><a href="https://redirect.github.com/actions/checkout/pull/1029">Update <code>@actions/io</code> to 1.1.2</a></li> <li><a href="https://redirect.github.com/actions/checkout/pull/1039">Upgrading version to 3.2.0</a></li> </ul> <h2>v3.1.0</h2> <ul> <li><a href="https://redirect.github.com/actions/checkout/pull/939">Use <code>@actions/core</code> <code>saveState</code> and <code>getState</code></a></li> <li><a href="https://redirect.github.com/actions/checkout/pull/922">Add <code>github-server-url</code> input</a></li> </ul> <h2>v3.0.2</h2> <ul> <li><a href="https://redirect.github.com/actions/checkout/pull/770">Add input <code>set-safe-directory</code></a></li> </ul> <h2>v3.0.1</h2> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="3df4ab11eb"><code>3df4ab1</code></a> Release 4.0.0 (<a href="https://redirect.github.com/actions/checkout/issues/1447">#1447</a>)</li> <li><a href="8b5e8b7687"><code>8b5e8b7</code></a> Support fetching without the --progress option (<a href="https://redirect.github.com/actions/checkout/issues/1067">#1067</a>)</li> <li><a href="97a652b800"><code>97a652b</code></a> Update default runtime to node20 (<a href="https://redirect.github.com/actions/checkout/issues/1436">#1436</a>)</li> <li>See full diff in <a href="https://github.com/actions/checkout/compare/v3...v4">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) You can trigger a rebase of this PR by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details>
389 lines
15 KiB
YAML
389 lines
15 KiB
YAML
name: Sanity Testing
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
workflow_dispatch:
|
|
inputs:
|
|
user:
|
|
description: 'User to run sanity test on'
|
|
|
|
permissions:
|
|
# required to retrieve AWS credentials
|
|
id-token: write
|
|
contents: write
|
|
|
|
# cancel currently running jobs if a new version of the branch is pushed
|
|
concurrency:
|
|
group: sanity_testing-${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
SetM365App:
|
|
uses: alcionai/corso/.github/workflows/accSelector.yaml@main
|
|
|
|
Sanity-Tests:
|
|
needs: [ SetM365App ]
|
|
environment: Testing
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
# Need these in the local env so that corso can read them
|
|
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
|
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_ACCESS_KEY_SECRET }}
|
|
AZURE_CLIENT_ID: ${{ secrets[needs.SetM365App.outputs.client_id_env] }}
|
|
AZURE_CLIENT_SECRET: ${{ secrets[needs.SetM365App.outputs.client_secret_env] }}
|
|
AZURE_TENANT_ID: ${{ secrets.TENANT_ID }}
|
|
CORSO_PASSPHRASE: ${{ secrets.INTEGRATION_TEST_CORSO_PASSPHRASE }}
|
|
# re-used values
|
|
CORSO_LOG_DIR: ${{ github.workspace }}/src/testlog
|
|
CORSO_LOG_FILE: ${{ github.workspace }}/src/testlog/run-sanity.log
|
|
RESTORE_DEST_PFX: Corso_Test_Sanity_
|
|
TEST_USER: ${{ github.event.inputs.user != '' && github.event.inputs.user || secrets.CORSO_M365_TEST_USER_ID }}
|
|
CORSO_ENABLE_GROUPS: true
|
|
|
|
defaults:
|
|
run:
|
|
working-directory: src
|
|
|
|
##########################################################################################################################################
|
|
|
|
# setup
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup Golang with cache
|
|
uses: magnetikonline/action-golang-cache@v4
|
|
with:
|
|
go-version-file: src/go.mod
|
|
|
|
- run: go build -o corso
|
|
- run: go build -o sanity-test ./cmd/sanity_test
|
|
|
|
- run: mkdir ${CORSO_LOG_DIR}
|
|
|
|
##########################################################################################################################################
|
|
|
|
# Pre-Run cleanup
|
|
|
|
# unlike CI tests, sanity tests are not expected to run concurrently.
|
|
# however, the sanity yaml concurrency is set to a maximum of 1 run, preferring
|
|
# the latest release. If we wait to clean up the production til after the tests
|
|
# It would be possible to complete all the testing but cancel the run before
|
|
# cleanup occurs. Setting the cleanup before the tests ensures we always begin
|
|
# with a clean slate, and cannot compound data production.
|
|
- name: Set purge boundary
|
|
if: always()
|
|
run: |
|
|
echo "NOW=$(date +"%Y-%m-%dT%H:%M:%SZ")" >> $GITHUB_ENV
|
|
|
|
- name: Purge CI-Produced Folders for Users
|
|
uses: ./.github/actions/purge-m365-data
|
|
with:
|
|
user: ${{ env.TEST_USER }}
|
|
folder-prefix: ${{ env.RESTORE_DEST_PFX }}
|
|
older-than: ${{ env.NOW }}
|
|
azure-client-id: ${{ secrets[needs.SetM365App.outputs.client_id_env] }}
|
|
azure-client-secret: ${{ secrets[needs.SetM365App.outputs.client_secret_env] }}
|
|
azure-tenant-id: ${{ secrets.TENANT_ID }}
|
|
m365-admin-user: ${{ secrets.M365_TENANT_ADMIN_USER }}
|
|
m365-admin-password: ${{ secrets.M365_TENANT_ADMIN_PASSWORD }}
|
|
|
|
- name: Purge CI-Produced Folders for Sites
|
|
if: always()
|
|
uses: ./.github/actions/purge-m365-data
|
|
with:
|
|
site: ${{ secrets.CORSO_M365_TEST_SITE_URL }}
|
|
folder-prefix: ${{ env.RESTORE_DEST_PFX }}
|
|
libraries: ${{ vars.CORSO_M365_TEST_SITE_LIBRARIES }}
|
|
older-than: ${{ env.NOW }}
|
|
azure-client-id: ${{ secrets[needs.SetM365App.outputs.client_id_env] }}
|
|
azure-client-secret: ${{ secrets[needs.SetM365App.outputs.client_secret_env] }}
|
|
azure-tenant-id: ${{ secrets.TENANT_ID }}
|
|
m365-admin-user: ${{ secrets.M365_TENANT_ADMIN_USER }}
|
|
m365-admin-password: ${{ secrets.M365_TENANT_ADMIN_PASSWORD }}
|
|
|
|
##########################################################################################################################################
|
|
|
|
# Repository commands
|
|
|
|
- name: Version Test
|
|
run: |
|
|
./corso --version | grep -c 'Corso version:'
|
|
|
|
- name: Repo init test
|
|
id: repo-init
|
|
run: |
|
|
set -euo pipefail
|
|
prefix=$(date +"%Y-%m-%d-%T")
|
|
echo -e "\nRepo init test\n" >> ${{ env.CORSO_LOG_FILE }}
|
|
./corso repo init s3 \
|
|
--no-stats \
|
|
--hide-progress \
|
|
--prefix $prefix \
|
|
--bucket ${{ secrets.CI_TESTS_S3_BUCKET }} \
|
|
2>&1 | tee ${{ env.CORSO_LOG_DIR }}/gotest-repo-init.log
|
|
|
|
if ! grep -q 'Initialized a S3 repository within bucket' ${{ env.CORSO_LOG_DIR }}/gotest-repo-init.log
|
|
then
|
|
echo "Repo could not be initialized"
|
|
exit 1
|
|
fi
|
|
|
|
echo result="$prefix" >> $GITHUB_OUTPUT
|
|
|
|
- name: Repo connect test
|
|
run: |
|
|
set -euo pipefail
|
|
echo -e "\nRepo connect test\n" >> ${{ env.CORSO_LOG_FILE }}
|
|
./corso repo connect s3 \
|
|
--no-stats \
|
|
--hide-progress \
|
|
--prefix ${{ steps.repo-init.outputs.result }} \
|
|
--bucket ${{ secrets.CI_TESTS_S3_BUCKET }} \
|
|
2>&1 | tee ${{ env.CORSO_LOG_DIR }}/gotest-repo-connect.log
|
|
|
|
if ! grep -q 'Connected to S3 bucket' ${{ env.CORSO_LOG_DIR }}/gotest-repo-connect.log
|
|
then
|
|
echo "Repo could not be connected"
|
|
exit 1
|
|
fi
|
|
|
|
##########################################################################################################################################
|
|
|
|
# Exchange
|
|
|
|
# generate new entries to roll into the next load test
|
|
# only runs if the test was successful
|
|
- name: Exchange - Create new data
|
|
working-directory: ./src/cmd/factory
|
|
run: |
|
|
go run . exchange emails \
|
|
--user ${{ env.TEST_USER }} \
|
|
--tenant ${{ secrets.TENANT_ID }} \
|
|
--destination ${{ env.RESTORE_DEST_PFX }}${{ steps.repo-init.outputs.result }} \
|
|
--count 4
|
|
|
|
- name: Exchange - Backup
|
|
id: exchange-backup
|
|
uses: ./.github/actions/backup-restore-test
|
|
with:
|
|
service: exchange
|
|
kind: initial
|
|
backup-args: '--mailbox "${{ env.TEST_USER }}" --data "email"'
|
|
restore-args: '--email-folder ${{ env.RESTORE_DEST_PFX }}${{ steps.repo-init.outputs.result }}'
|
|
test-folder: '${{ env.RESTORE_DEST_PFX }}${{ steps.repo-init.outputs.result }}'
|
|
log-dir: ${{ env.CORSO_LOG_DIR }}
|
|
|
|
- name: Exchange - Incremental backup
|
|
id: exchange-backup-incremental
|
|
uses: ./.github/actions/backup-restore-test
|
|
with:
|
|
service: exchange
|
|
kind: incremental
|
|
backup-args: '--mailbox "${{ env.TEST_USER }}" --data "email"'
|
|
restore-args: '--email-folder ${{ env.RESTORE_DEST_PFX }}${{ steps.repo-init.outputs.result }}'
|
|
test-folder: '${{ env.RESTORE_DEST_PFX }}${{ steps.repo-init.outputs.result }}'
|
|
base-backup: ${{ steps.exchange-backup.outputs.backup-id }}
|
|
log-dir: ${{ env.CORSO_LOG_DIR }}
|
|
|
|
- name: Exchange - Non delta backup
|
|
id: exchange-backup-non-delta
|
|
uses: ./.github/actions/backup-restore-test
|
|
with:
|
|
service: exchange
|
|
kind: non-delta
|
|
backup-args: '--mailbox "${{ env.TEST_USER }}" --data "email" --disable-delta'
|
|
restore-args: '--email-folder ${{ env.RESTORE_DEST_PFX }}${{ steps.repo-init.outputs.result }}'
|
|
test-folder: '${{ env.RESTORE_DEST_PFX }}${{ steps.repo-init.outputs.result }}'
|
|
base-backup: ${{ steps.exchange-backup.outputs.backup-id }}
|
|
log-dir: ${{ env.CORSO_LOG_DIR }}
|
|
|
|
- name: Exchange - Incremental backup after non-delta
|
|
id: exchange-backup-incremental-after-non-delta
|
|
uses: ./.github/actions/backup-restore-test
|
|
with:
|
|
service: exchange
|
|
kind: non-delta-incremental
|
|
backup-args: '--mailbox "${{ env.TEST_USER }}" --data "email"'
|
|
restore-args: '--email-folder ${{ env.RESTORE_DEST_PFX }}${{ steps.repo-init.outputs.result }}'
|
|
test-folder: '${{ env.RESTORE_DEST_PFX }}${{ steps.repo-init.outputs.result }}'
|
|
base-backup: ${{ steps.exchange-backup.outputs.backup-id }}
|
|
log-dir: ${{ env.CORSO_LOG_DIR }}
|
|
|
|
|
|
##########################################################################################################################################
|
|
|
|
# Onedrive
|
|
|
|
# generate new entries for test
|
|
- name: OneDrive - Create new data
|
|
id: new-data-creation-onedrive
|
|
working-directory: ./src/cmd/factory
|
|
run: |
|
|
suffix=$(date +"%Y-%m-%d_%H-%M-%S")
|
|
|
|
go run . onedrive files \
|
|
--user ${{ env.TEST_USER }} \
|
|
--secondaryuser ${{ env.CORSO_SECONDARY_M365_TEST_USER_ID }} \
|
|
--tenant ${{ secrets.TENANT_ID }} \
|
|
--destination ${{ env.RESTORE_DEST_PFX }}$suffix \
|
|
--count 4
|
|
|
|
echo result="${suffix}" >> $GITHUB_OUTPUT
|
|
|
|
- name: OneDrive - Backup
|
|
id: onedrive-backup
|
|
uses: ./.github/actions/backup-restore-test
|
|
with:
|
|
service: onedrive
|
|
kind: initial
|
|
backup-args: '--user "${{ env.TEST_USER }}"'
|
|
restore-args: '--folder ${{ env.RESTORE_DEST_PFX }}${{ steps.new-data-creation-onedrive.outputs.result }} --restore-permissions'
|
|
test-folder: '${{ env.RESTORE_DEST_PFX }}${{ steps.new-data-creation-onedrive.outputs.result }}'
|
|
log-dir: ${{ env.CORSO_LOG_DIR }}
|
|
with-export: true
|
|
|
|
# generate some more enteries for incremental check
|
|
- name: OneDrive - Create new data (for incremental)
|
|
working-directory: ./src/cmd/factory
|
|
run: |
|
|
go run . onedrive files \
|
|
--user ${{ env.TEST_USER }} \
|
|
--secondaryuser ${{ env.CORSO_SECONDARY_M365_TEST_USER_ID }} \
|
|
--tenant ${{ secrets.TENANT_ID }} \
|
|
--destination ${{ env.RESTORE_DEST_PFX }}${{ steps.new-data-creation-onedrive.outputs.result }} \
|
|
--count 4
|
|
|
|
- name: OneDrive - Incremental backup
|
|
id: onedrive-incremental
|
|
uses: ./.github/actions/backup-restore-test
|
|
with:
|
|
service: onedrive
|
|
kind: incremental
|
|
backup-args: '--user "${{ env.TEST_USER }}"'
|
|
restore-args: '--folder ${{ env.RESTORE_DEST_PFX }}${{ steps.new-data-creation-onedrive.outputs.result }} --restore-permissions'
|
|
test-folder: '${{ env.RESTORE_DEST_PFX }}${{ steps.new-data-creation-onedrive.outputs.result }}'
|
|
log-dir: ${{ env.CORSO_LOG_DIR }}
|
|
with-export: true
|
|
|
|
##########################################################################################################################################
|
|
|
|
# Sharepoint
|
|
|
|
# generate new entries for test
|
|
- name: SharePoint - Create new data
|
|
id: new-data-creation-sharepoint
|
|
working-directory: ./src/cmd/factory
|
|
run: |
|
|
suffix=$(date +"%Y-%m-%d_%H-%M-%S")
|
|
|
|
go run . sharepoint files \
|
|
--site ${{ secrets.CORSO_M365_TEST_SITE_URL }} \
|
|
--user ${{ env.TEST_USER }} \
|
|
--secondaryuser ${{ env.CORSO_SECONDARY_M365_TEST_USER_ID }} \
|
|
--tenant ${{ secrets.TENANT_ID }} \
|
|
--destination ${{ env.RESTORE_DEST_PFX }}$suffix \
|
|
--count 4
|
|
|
|
echo result="${suffix}" >> $GITHUB_OUTPUT
|
|
|
|
- name: SharePoint - Backup
|
|
id: sharepoint-backup
|
|
uses: ./.github/actions/backup-restore-test
|
|
with:
|
|
service: sharepoint
|
|
kind: initial
|
|
backup-args: '--site "${{ secrets.CORSO_M365_TEST_SITE_URL }}"'
|
|
restore-args: '--folder ${{ env.RESTORE_DEST_PFX }}${{ steps.new-data-creation-sharepoint.outputs.result }} --restore-permissions'
|
|
test-folder: '${{ env.RESTORE_DEST_PFX }}${{ steps.new-data-creation-sharepoint.outputs.result }}'
|
|
log-dir: ${{ env.CORSO_LOG_DIR }}
|
|
with-export: true
|
|
|
|
# generate some more enteries for incremental check
|
|
- name: SharePoint - Create new data (for incremental)
|
|
working-directory: ./src/cmd/factory
|
|
run: |
|
|
go run . sharepoint files \
|
|
--site ${{ secrets.CORSO_M365_TEST_SITE_URL }} \
|
|
--user ${{ env.TEST_USER }} \
|
|
--secondaryuser ${{ env.CORSO_SECONDARY_M365_TEST_USER_ID }} \
|
|
--tenant ${{ secrets.TENANT_ID }} \
|
|
--destination ${{ env.RESTORE_DEST_PFX }}${{ steps.new-data-creation-sharepoint.outputs.result }} \
|
|
--count 4
|
|
|
|
- name: SharePoint - Incremental backup
|
|
id: sharepoint-incremental
|
|
uses: ./.github/actions/backup-restore-test
|
|
with:
|
|
service: sharepoint
|
|
kind: incremental
|
|
backup-args: '--site "${{ secrets.CORSO_M365_TEST_SITE_URL }}"'
|
|
restore-args: '--folder ${{ env.RESTORE_DEST_PFX }}${{ steps.new-data-creation-sharepoint.outputs.result }} --restore-permissions'
|
|
test-folder: '${{ env.RESTORE_DEST_PFX }}${{ steps.new-data-creation-sharepoint.outputs.result }}'
|
|
log-dir: ${{ env.CORSO_LOG_DIR }}
|
|
with-export: true
|
|
|
|
##########################################################################################################################################
|
|
|
|
# Groups and Teams
|
|
|
|
# generate new entries for test
|
|
- name: Groups - Create new data
|
|
id: new-data-creation-groups
|
|
working-directory: ./src/cmd/factory
|
|
run: |
|
|
suffix=$(date +"%Y-%m-%d_%H-%M-%S")
|
|
|
|
go run . sharepoint files \
|
|
--site ${{ vars.CORSO_M365_TEST_GROUPS_SITE_URL }} \
|
|
--user ${{ env.TEST_USER }} \
|
|
--secondaryuser ${{ env.CORSO_SECONDARY_M365_TEST_USER_ID }} \
|
|
--tenant ${{ secrets.TENANT_ID }} \
|
|
--destination ${{ env.RESTORE_DEST_PFX }}$suffix \
|
|
--count 4
|
|
|
|
echo result="${suffix}" >> $GITHUB_OUTPUT
|
|
|
|
- name: Groups - Backup
|
|
id: groups-backup
|
|
uses: ./.github/actions/backup-restore-test
|
|
with:
|
|
service: groups
|
|
kind: initial
|
|
backup-args: '--group "${{ vars.CORSO_M365_TEST_TEAM_ID }}"'
|
|
test-folder: '${{ env.RESTORE_DEST_PFX }}${{ steps.new-data-creation-groups.outputs.result }}'
|
|
log-dir: ${{ env.CORSO_LOG_DIR }}
|
|
|
|
- name: Teams - Backup
|
|
id: teams-backup
|
|
uses: ./.github/actions/backup-restore-test
|
|
with:
|
|
service: teams
|
|
kind: initial
|
|
backup-args: '--group "${{ vars.CORSO_M365_TEST_TEAM_ID }}"'
|
|
test-folder: '${{ env.RESTORE_DEST_PFX }}${{ steps.new-data-creation-groups.outputs.result }}'
|
|
log-dir: ${{ env.CORSO_LOG_DIR }}
|
|
|
|
# TODO: incrementals
|
|
|
|
##########################################################################################################################################
|
|
|
|
# Logging & Notifications
|
|
|
|
# Upload the original go test output as an artifact for later review.
|
|
- name: Upload test log
|
|
if: always()
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: sanity-test-log
|
|
path: ${{ env.CORSO_LOG_DIR }}/*
|
|
if-no-files-found: error
|
|
retention-days: 14
|
|
|
|
- name: Notify failure in slack
|
|
if: failure()
|
|
uses: ./.github/actions/slack-message
|
|
with:
|
|
msg: "[FAILED] Sanity Tests"
|
|
slack_url: ${{ secrets.SLACK_WEBHOOK_URL }} |