fix up mergequeue and ci (#21)

* fix up mergequeue and ci

* rename ci job

* spacing out triggers?

* fix ci script

* fixing up test runner
This commit is contained in:
Keepers 2024-02-08 14:37:59 -07:00 committed by GitHub
parent ef6ca8583a
commit 1752d1117f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 110 additions and 66 deletions

View File

@ -23,7 +23,7 @@ runs:
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: ${{ inputs.aws-iam-role }}
role-session-name: integration-testing
role-session-name: canario-integration-testing
aws-region: us-east-1
- name: Add rotbots.txt

View File

@ -56,7 +56,7 @@ runs:
"type": "TextBlock",
"size": "Medium",
"weight": "Bolder",
"text": "${{ inputs.msg }}",
"text": "Canario - ${{ inputs.msg }}",
"color": "Attention"
},
{

View File

@ -1,15 +1,15 @@
name: Build/Release Corso
env:
IMAGE_NAME: ghcr.io/alcionai/canario
name: Build Canario
# holdover from corso
# canario should not build any images
#env:
# IMAGE_NAME: ghcr.io/alcionai/canario
on:
workflow_dispatch:
merge_group:
pull_request:
push:
branches: [main]
tags: ["v*.*.*"]
repository_dispatch:
types: [ok-to-test-command]
@ -101,7 +101,22 @@ jobs:
echo "website-cfid=ESFTEIYTIP7Y3" | tee -a $GITHUB_OUTPUT
fi
Seeing-Things:
environment: Testing
runs-on: ubuntu-latest
steps:
- shell: bash
run: echo "github.ref"
- shell: bash
run: echo ${{ github.ref }}
- shell: bash
run: echo "github.event.merge_queue.head.repo.full_name"
- shell: bash
run: echo ${{ github.event.merge_queue.head.repo.full_name }}
- shell: bash
run: echo "github.repository"
- shell: bash
run: echo ${{ github.repository }}
# ----------------------------------------------------------------------------------------------------
# --- Website Linting -----------------------------------------------------------------------------------
# ----------------------------------------------------------------------------------------------------
@ -130,7 +145,16 @@ jobs:
environment: Testing
runs-on: ubuntu-latest
timeout-minutes: 120
if: (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main') || (needs.precheck.outputs.srcfileschanged == 'true' && github.event.pull_request.head.repo.full_name == github.repository)
if: |
(
startsWith(github.ref, 'refs/tags/')
|| github.ref == 'refs/heads/gh-readonly-queue/main'
|| github.ref == 'refs/heads/main'
)
|| (
needs.precheck.outputs.srcfileschanged == 'true'
&& github.event.pull_request.head.repo.full_name == github.repository
)
defaults:
run:
working-directory: src
@ -160,7 +184,7 @@ jobs:
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.AWS_IAM_ROLE }}
role-session-name: integration-testing
role-session-name: canario-integration-testing
aws-region: us-east-1
# run the tests
@ -231,7 +255,7 @@ jobs:
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.AWS_IAM_ROLE }}
role-session-name: integration-testing
role-session-name: canario-integration-testing
aws-region: us-east-1
# run the tests
@ -325,7 +349,9 @@ jobs:
Test-Suite-Fork:
needs: [Precheck]
environment: Testing
if: (!startsWith(github.ref , 'refs/tags/') && github.ref != 'refs/heads/main') && (needs.precheck.outputs.srcfileschanged == 'true' && github.event.pull_request.head.repo.full_name != github.repository)
# test-suite-fork is a corso build artifact.
if: false
# if: (!startsWith(github.ref , 'refs/tags/') && github.ref != 'refs/heads/main') && (needs.precheck.outputs.srcfileschanged == 'true' && github.event.pull_request.head.repo.full_name != github.repository)
runs-on: ubuntu-latest
defaults:
run:
@ -380,7 +406,7 @@ jobs:
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.AWS_IAM_ROLE }}
role-session-name: integration-testing
role-session-name: canario-integration-testing
aws-region: us-east-1
# run the tests

View File

@ -1,13 +1,23 @@
name: CI Test Cleanup
on:
workflow_dispatch:
schedule:
# neither of the jobs are currently running (corso already runs them),
# so this action is turned off until we decide it's needed.
# workflow_dispatch:
# schedule:
# every half hour
- cron: "*/30 * * * *"
# - cron: "*/30 * * * *"
#
push:
branches:
does-not-exist-this-forces-the-action-to-not-run
jobs:
Test-User-Data-Cleanup:
environment: Testing
# forced off - this is already running in corso
# we may need to turn this back on if we elect different
# test users compared to the corso repo
if: false
runs-on: ubuntu-latest
continue-on-error: true
strategy:
@ -43,6 +53,10 @@ jobs:
Test-Site-Data-Cleanup:
environment: Testing
# forced off - this is already running in corso
# we may need to turn this back on if we elect different
# test users compared to the corso repo
if: false
runs-on: ubuntu-latest
continue-on-error: true
strategy:

View File

@ -76,8 +76,7 @@ jobs:
git checkout ${{ steps.version.outputs.version }}
git checkout ${{ github.ref }} -- .github
- run:
- run: go build -o canario
timeout-minutes: 10
- run: mkdir ${CORSO_LOG_DIR}
@ -89,7 +88,7 @@ jobs:
timeout-minutes: 10
with:
role-to-assume: ${{ secrets.AWS_IAM_ROLE }}
role-session-name: integration-testing
role-session-name: canario-integration-testing
aws-region: us-east-1
##########################################################################

View File

@ -3,8 +3,9 @@ on:
workflow_dispatch:
schedule:
# Run every day at 04:00 GMT (roughly 8pm PST)
- cron: "0 4 * * *"
# Run every day at 06:00 GMT (roughly 10pm PST)
# corso runs at 04:00 GMT, this is slightly offset to avoid conflicts.
- cron: "0 6 * * *"
permissions:
# required to retrieve AWS credentials

View File

@ -1,6 +1,10 @@
name: Publish website
on:
workflow_dispatch:
# workflow_dispatch:
# turned off for now, since canario should not publish the website
push:
branches:
does-not-exist-this-forces-the-action-to-not-run
permissions:
# required to retrieve AWS credentials