mirror of
https://github.com/bartvdbraak/keyweave.git
synced 2025-04-28 15:21:21 +00:00
47 lines
1 KiB
YAML
47 lines
1 KiB
YAML
name: Tests
|
|
|
|
permissions:
|
|
id-token: write
|
|
contents: read
|
|
|
|
on:
|
|
push:
|
|
branches: [ main ]
|
|
pull_request:
|
|
branches: [ main ]
|
|
|
|
jobs:
|
|
bicep:
|
|
name: Deploy Azure resources
|
|
environment: bicep
|
|
runs-on: ubuntu-latest
|
|
concurrency:
|
|
group: bicep
|
|
env:
|
|
LOCATION: eastus
|
|
DEPLOYMENT_NAME: keyweave-${{ github.run_id }}
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: azure/login@v1
|
|
with:
|
|
client-id: ${{ secrets.AZURE_CLIENT_ID }}
|
|
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
|
|
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
|
|
- name: Deploy Bicep template
|
|
uses: azure/arm-deploy@v1
|
|
with:
|
|
scope: subscription
|
|
region: ${{ env.LOCATION }}
|
|
template: bicep/main.bicep
|
|
deploymentName: ${{ env.DEPLOYMENT_NAME }}
|
|
|
|
test:
|
|
name: Tests
|
|
needs: bicep
|
|
runs-on: ubuntu-latest
|
|
environment: test
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
- name: Run all tests
|
|
run: cargo test --all
|