remove duplicate code #126
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [master] | |
| tags: ["*"] | |
| pull_request: | |
| jobs: | |
| test: | |
| name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| version: | |
| - lts | |
| - 1 # automatically expands to the latest stable 1.x release of Julia | |
| os: | |
| - ubuntu-latest | |
| - macOS-latest | |
| - windows-latest | |
| arch: | |
| - x64 | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - uses: azure/[email protected] | |
| with: | |
| creds: '{"clientId":"${{ secrets.CLIENT_ID }}","clientSecret":"${{ secrets.CLIENT_SECRET }}","subscriptionId":"${{ secrets.SUBSCRIPTION_ID }}","tenantId":"${{ secrets.TENANT_ID }}"}' | |
| - uses: julia-actions/setup-julia@v2 | |
| with: | |
| version: ${{ matrix.version }} | |
| arch: ${{ matrix.arch }} | |
| - name: Generate UUID | |
| id: uuid | |
| run: julia -e 'using Random; write(stdout,"::set-output name=uuid::"*lowercase(randstring(21)))' | |
| shell: bash | |
| - name: Run Az CLI script - create resource group / storage accounts | |
| run: | | |
| az group create -l southcentralus -n "AzureBackupRG-azstorage-${{ matrix.os }}-${{ matrix.version }}-${{ github.run_id }}" | |
| az storage account create --min-tls-version TLS1_2 -n "s${{ steps.uuid.outputs.uuid }}" -g "AzureBackupRG-azstorage-${{ matrix.os }}-${{ matrix.version }}-${{ github.run_id }}" -l southcentralus | |
| az storage account create --min-tls-version TLS1_2 -n "s${{ steps.uuid.outputs.uuid }}2" -g "AzureBackupRG-azstorage-${{ matrix.os }}-${{ matrix.version }}-${{ github.run_id }}" -l southcentralus | |
| - uses: julia-actions/cache@v1 | |
| - uses: julia-actions/julia-buildpkg@v1 | |
| - uses: julia-actions/julia-runtest@v1 | |
| env: | |
| CLIENT_ID: ${{ secrets.CLIENT_ID }} | |
| CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }} | |
| TENANT: ${{ secrets.TENANT_ID }} | |
| STORAGE_ACCOUNT: "s${{ steps.uuid.outputs.uuid }}" | |
| STORAGE_ACCOUNT_TOO: "s${{ steps.uuid.outputs.uuid }}2" | |
| - uses: julia-actions/julia-processcoverage@v1 | |
| - uses: codecov/codecov-action@v5 | |
| with: | |
| file: lcov.info | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| - name: Run Az CLI script - delete resource group / storage accounts | |
| run: | | |
| az group delete -n "AzureBackupRG-azstorage-${{ matrix.os }}-${{ matrix.version }}-${{ github.run_id }}" --yes | |
| if: ${{ always() }} | |
| docs: | |
| name: Documentation | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - uses: julia-actions/setup-julia@v1 | |
| with: | |
| version: '1' | |
| - run: | | |
| julia --project=docs -e ' | |
| using Pkg | |
| Pkg.develop(PackageSpec(path=pwd())) | |
| Pkg.instantiate()' | |
| - run: julia --project=docs docs/make.jl | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} |