mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2024-12-26 18:45:25 +00:00
6925fa8e4e
* Use Az login with OpenID connection to get test credentials. * Set subscription id environment variable. * Update testExplorer and cleanup job. * Retrieve access token in test case and pass to testExplorer. * Add debug tracing for tests. * Set up other mongo test to use Az CLI creds. * Revert subscription id retrieval. * Add CLI credentials retrieval to rest of tests. * Fix missing imports. * Clean up redundant code. * Remove commented import statement.
40 lines
1.1 KiB
YAML
40 lines
1.1 KiB
YAML
# This is a basic workflow to help you get started with Actions
|
|
|
|
name: Cleanup End to End Account Resources
|
|
|
|
on:
|
|
# Allows you to run this workflow manually from the Actions tab
|
|
workflow_dispatch:
|
|
schedule:
|
|
# Once every hour
|
|
- cron: "0 15 * * *"
|
|
|
|
permissions:
|
|
id-token: write
|
|
contents: read
|
|
|
|
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
|
jobs:
|
|
# This workflow contains a single job called "build"
|
|
cleanupaccounts:
|
|
name: "Cleanup Test Database Accounts"
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: "Az CLI login"
|
|
uses: azure/login@v1
|
|
with:
|
|
client-id: ${{ secrets.AZURE_CLIENT_ID }}
|
|
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
|
|
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
|
|
|
|
- name: Use Node.js 18.x
|
|
uses: actions/setup-node@v1
|
|
with:
|
|
node-version: 18.x
|
|
- run: npm ci
|
|
- run: node utils/cleanupDBs.js
|