-
Notifications
You must be signed in to change notification settings - Fork 175
63 lines (56 loc) · 1.59 KB
/
dynamodb.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: DynamoDB tests
on:
push:
branches: [ main ]
pull_request:
branches:
- "**"
paths:
- '.github/workflows/dynamodb.yml'
- 'toolchains/**'
- 'linera-views/**'
- 'linera-storage/**'
workflow_dispatch:
# This allows a subsequently queued workflow run to interrupt previous runs on pull-requests
concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.run_id }}'
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0
CARGO_NET_RETRY: 10
RUST_BACKTRACE: short
RUSTFLAGS: "-D warnings"
RUSTUP_MAX_RETRIES: 10
RUST_LOG: warn
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest-8-cores
timeout-minutes: 40
steps:
- uses: actions/checkout@v3
- uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Build example applications
run: |
cd examples
cargo build --locked --release --target wasm32-unknown-unknown
- name: Build
run: |
cargo build --locked --features dynamodb
- name: Setup local DynamoDB instance
run: |
docker run --rm -d --name local-dynamodb -p 8000:8000/tcp amazon/dynamodb-local
- name: Run DynamoDB tests
env:
AWS_REGION: us-east-1
AWS_ACCESS_KEY_ID: test
AWS_SECRET_ACCESS_KEY: test
LOCALSTACK_ENDPOINT: http://localhost:8000
run: |
cargo test --locked --features dynamodb -- dynamo