Skip to content

Commit 6d9e42c

Browse files
authored
Add windows tests in circleci (#199)
At some point in the past, we were experimenting with using Azure to verify Window builds. Now that CircleCI supports Windows, we should keep everything on a single CI provider.
1 parent 2635e0d commit 6d9e42c

File tree

2 files changed

+65
-51
lines changed

2 files changed

+65
-51
lines changed

.circleci/config.yml

+65
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
version: 2.1
22

3+
orbs:
4+
win: circleci/windows@4.1.1
5+
36
workflows:
47
version: 2
58
test:
69
jobs:
10+
- build-test-windows
711
- build-test-linux:
812
name: Ruby 2.5
913
docker-image: cimg/ruby:2.5
@@ -22,6 +26,67 @@ workflows:
2226
jruby: true
2327

2428
jobs:
29+
build-test-windows:
30+
executor:
31+
name: win/default
32+
33+
steps:
34+
- checkout
35+
36+
- run:
37+
name: "Setup DynamoDB"
38+
command: |
39+
iwr -outf dynamo.zip https://s3-us-west-2.amazonaws.com/dynamodb-local/dynamodb_local_latest.zip
40+
mkdir dynamo
41+
Expand-Archive -Path dynamo.zip -DestinationPath dynamo
42+
- run:
43+
name: "Run DynamoDB"
44+
background: true
45+
working_directory: dynamo
46+
command: javaw -D"java.library.path=./DynamoDBLocal_lib" -jar DynamoDBLocal.jar
47+
48+
- run:
49+
name: "Setup Consul"
50+
command: |
51+
iwr -outf consul.zip https://releases.hashicorp.com/consul/1.4.2/consul_1.4.2_windows_amd64.zip
52+
mkdir consul
53+
Expand-Archive -Path consul.zip -DestinationPath consul
54+
sc.exe create "Consul" binPath="C:/Users/circleci/project/consul/consul.exe agent -dev"
55+
- run:
56+
name: "Run Consul"
57+
background: true
58+
working_directory: consul
59+
command: sc.exe start "Consul"
60+
61+
- run:
62+
name: "Setup Redis"
63+
command: |
64+
iwr -outf redis.zip https://github.com/MicrosoftArchive/redis/releases/download/win-3.0.504/Redis-x64-3.0.504.zip
65+
mkdir redis
66+
Expand-Archive -Path redis.zip -DestinationPath redis
67+
cd redis
68+
./redis-server --service-install
69+
- run:
70+
name: "Run Redis"
71+
background: true
72+
working_directory: redis
73+
command: |
74+
./redis-server --service-start
75+
76+
- run: ruby -v
77+
- run: choco install msys2 --allow-downgrade -y --version 20200903.0.0
78+
- run: ridk.cmd exec pacman -S --noconfirm --needed base-devel mingw-w64-x86_64-toolchain
79+
80+
- run: gem install bundler -v 2.2.33
81+
- run: bundle _2.2.33_ install
82+
- run: mkdir /tmp/circle-artifacts
83+
- run: bundle _2.2.33_ exec rspec --format documentation --format RspecJunitFormatter -o /tmp/circle-artifacts/rspec.xml spec
84+
85+
- store_test_results:
86+
path: /tmp/circle-artifacts
87+
- store_artifacts:
88+
path: /tmp/circle-artifacts
89+
2590
build-test-linux:
2691
parameters:
2792
docker-image:

azure-pipelines.yml

-51
This file was deleted.

0 commit comments

Comments
 (0)