-
Notifications
You must be signed in to change notification settings - Fork 1
34 lines (34 loc) · 1.26 KB
/
Copy pathstack-cloud.yaml
File metadata and controls
34 lines (34 loc) · 1.26 KB
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
name: Stack Hosted Cloud PubSub Test
on: [push]
jobs:
build-and-test:
name: Build and Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: haskell-actions/setup@f9150cb1d140e9a9271700670baa38991e6fa25c # v2.10.3
with:
enable-stack: true
stack-no-global: true
stack-version: "3.3.1"
- name: Cache Stack Dependencies
uses: actions/cache@v2
with:
path: |
~/.stack
key: ${{ runner.os }}-${{ hashFiles('stack.yaml', 'stack.yaml.lock') }}-${{ hashFiles('package.yaml') }}
restore-keys: |
- ${{ runner.os }}-${{ hashFiles('stack.yaml', 'stack.yaml.lock') }}-${{ hashFiles('package.yaml') }}
- ${{ runner.os }}-${{ hashFiles('stack.yaml', 'stack.yaml.lock') }}
- ${{ runner.os }}-
- name: Install Dependencies
run: stack install --only-dependencies --test
- run: 'mkdir secrets && echo "$GCP_SA_KEY" > ./secrets/service_account.json'
shell: bash
env:
GCP_SA_KEY: ${{secrets.GCP_SA_KEY}}
- name: Run Tests
run: stack test
env:
PROJECT_ID: ${{secrets.PROJECT_ID}}
GOOGLE_APPLICATION_CREDENTIALS: ./secrets/service_account.json