-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (47 loc) · 1.2 KB
/
test.yml
File metadata and controls
58 lines (47 loc) · 1.2 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
on:
push:
branches:
- '*'
tags-ignore:
- '*'
pull_request:
workflow_dispatch:
jobs:
test:
name: test
strategy:
fail-fast: false
matrix:
version:
- 4.0
- 4.2
- 4.4
- 5.0
- 6.0
- 7.0
- 8.0
runs-on: ubuntu-latest
steps:
- run: uname -a
- run: ldconfig -p
- run: lsb_release -a
- name: install mongosh
run: npm install -g mongosh
- name: Check out repository
uses: actions/checkout@v4
# - name: Set up QEMU
# if: ${{ matrix.arch != 'amd64' }}
# uses: docker/setup-qemu-action@v2
#
# - name: Set up Docker Buildx
# if: ${{ matrix.arch != 'amd64' }}
# uses: docker/setup-buildx-action@v2
- name: build
#run: docker buildx build . --platform linux/${{matrix.arch}} --output type=docker,dest=$arch
run: docker buildx build . --tag mongo-provision
- name: test
run: |
set -o errexit
docker run -i --rm -p 27017:27017 mongo-provision 6.0 --single &
mpid="$!"
timeout 1m sh -c "while ! mongosh --eval 'show dbs'; do sleep 1; done"