Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
ci: [TT-412] adds other attempt to use secrets as env var
  • Loading branch information
cristiantoaquiza committed Nov 18, 2021
commit 1558588558ef977e3d33694c303aa3175afd8413
68 changes: 32 additions & 36 deletions .github/workflows/time-tracker-v1-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,45 +8,41 @@ on:

jobs:
time-tracker-ci:

runs-on: ubuntu-latest

strategy:
matrix:
python-version: [3.9]

steps:
- name: Checking out code from the repository
uses: actions/checkout@v2

- name: Setting up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements/time_tracker_api/dev.txt
pip install -r requirements/time_tracker_events/dev.txt

- name: Login to azure
uses: Azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}

- name: Get vault from azure
uses: Azure/get-keyvault-secrets@v1
with:
keyvault: "time-tracker-secrets"
secrets: 'MS-CLIENT-ID'
id: timeTrackerAzureVault

- name: Inject secrets
env:
MS_CLIENT_ID: ${{ steps.timeTrackerAzureVault.outputs.MS-CLIENT-ID }}

- name: Run tests
run: |
echo $MS_CLIENT_ID
pytest tests
- name: Checking out code from the repository
uses: actions/checkout@v2

- name: Setting up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements/time_tracker_api/dev.txt
pip install -r requirements/time_tracker_events/dev.txt

- name: Login to azure
uses: Azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}

- name: Get vault from azure
uses: Azure/get-keyvault-secrets@v1
with:
keyvault: "time-tracker-secrets"
secrets: "MS-CLIENT-ID"
id: timeTrackerAzureVault

- name: Run tests
env:
MS_CLIENT_ID: ${{ steps.timeTrackerAzureVault.outputs.MS-CLIENT-ID }}
run: |
pytest tests