-
Notifications
You must be signed in to change notification settings - Fork 154
116 lines (108 loc) · 3.8 KB
/
wash.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
name: wash
on:
push:
branches: [main]
merge_group:
pull_request:
branches: [main]
paths:
- .github/workflows/wash.yml
- Cargo.lock
- Cargo.toml
- crates/wash-cli/**
- crates/wash-lib/**
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
jobs:
unit_tests:
name: Unit Tests
strategy:
fail-fast: false # Ensure we can run the full suite even if one OS fails
matrix:
os: [ubuntu-22.04, windows-latest-8-cores, macos-12]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6
with:
node-version: "18.x"
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938
- run: rustup show
- uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84
with:
shared-key: "${{ matrix.os }}-shared-cache"
- name: Install nextest
uses: taiki-e/install-action@cbe8580ec991a0ff820fd912a2db18ba22dcbe54
with:
tool: nextest
- name: Install wit-bindgen
uses: taiki-e/install-action@cbe8580ec991a0ff820fd912a2db18ba22dcbe54
with:
tool: wit-bindgen-cli
- name: Build wash
run: make build
working-directory: ./crates/wash-cli
- name: Run all wash & wash-lib unit tests
run: make test-wash-ci
working-directory: ./crates/wash-cli
integration_tests:
name: Integration Tests
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938
- run: rustup show
- uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84
with:
shared-key: "ubuntu-22.04-shared-cache"
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32
with:
go-version: "1.22"
- uses: acifani/setup-tinygo@b2ba42b249c7d3efdfe94166ec0f48b3191404f7
with:
tinygo-version: "0.31.0"
install-binaryen: "false"
- name: Launch integration test services
uses: sudo-bot/action-docker-compose@ef4c4da08a9673f93d4eb8a5da1e942bf24a37ea
with:
cli-args: "-f ./crates/wash-cli/tools/docker-compose.yml up --detach"
- name: Install nextest
uses: taiki-e/install-action@cbe8580ec991a0ff820fd912a2db18ba22dcbe54
with:
tool: nextest
- name: Install wit-bindgen
uses: taiki-e/install-action@cbe8580ec991a0ff820fd912a2db18ba22dcbe54
with:
tool: wit-bindgen-cli
- name: Run integration tests
run: make test-integration-ci
working-directory: ./crates/wash-cli
# Regression E2E tests to ensure that `wash new component` works consistently,
# including older (released) versions of `wash`
e2e_tests_wash_new_actor:
name: E2E Tests (`wash new`)
runs-on: ubuntu-22.04
strategy:
matrix:
wash-version:
- current
template:
- hello-world-rust
steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938
if: ${{ matrix.wash-version == 'current' }}
- run: rustup show
- uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84
with:
shared-key: "ubuntu-22.04-shared-cache"
- name: install wash (previous version)
if: ${{ matrix.wash-version != 'current' }}
uses: taiki-e/install-action@cbe8580ec991a0ff820fd912a2db18ba22dcbe54
with:
tool: wash-cli@${{ matrix.wash-version }}
- name: install wash (current)
if: ${{ matrix.wash-version == 'current' }}
run: cargo install --path ./crates/wash-cli
- name: Ensure `wash new` works
run: wash new component ${{ matrix.template }} --template-name ${{ matrix.template }}