-
Notifications
You must be signed in to change notification settings - Fork 9
45 lines (43 loc) · 1.27 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: "units-test"
on:
# Triggers the workflow on push
push:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
# unit tests
units:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: npm ci
- run: npm test
# test action works running from the graph
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v2
- name: Load environment variables
uses: artursouza/export-env-action@v2
with:
envFile: "./.github/env/global.env"
expand: "true"
# Test that the default version is used
- name: Setup Dapr CLI default version
uses: ./
if: ${{ matrix.os == 'windows-latest'}}
# Test that explicit version is used
- name: Setup Dapr CLI specific version
uses: ./
if: ${{ matrix.os != 'windows-latest'}}
with:
version: ${{ env.DAPR_CLI_VERSION }}
- name: Initialize Dapr
if: ${{ matrix.os == 'ubuntu-latest'}}
run: |
export GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
dapr init --runtime-version=${{ env.DAPR_RUNTIME_VERSION }}
dapr --version