-
Notifications
You must be signed in to change notification settings - Fork 11
65 lines (63 loc) · 1.69 KB
/
test_install_import_docker.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
name: Test Install & Import on Docker
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
test:
strategy:
fail-fast: false
matrix:
node: ['14', '16', '18', '20']
platform: [
{
distro: '',
arch: 'linux/amd64'
},
{
distro: '',
arch: 'linux/arm64'
},
{
distro: '-buster',
arch: 'linux/amd64'
},
{
distro: '-bullseye',
arch: 'linux/amd64'
},
{
distro: '-alpine',
arch: 'linux/amd64'
},
{
distro: '-alpine',
arch: 'linux/arm64'
},
# {
# distro: '-alpine',
# arch: 'linux/arm/v7'
# }
]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Node.js 18
uses: actions/setup-node@v3
with:
node-version: 18
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: NPM Pack
run: npm pack
- name: Rename Package
run: mv faiss-node-*.tgz test-import/faiss-node.tgz
- name: Build docker on node:${{ matrix.node }}${{ matrix.platform.distro }}
working-directory: ./test-import
run: docker buildx build --platform ${{ matrix.platform.arch }} -o type=docker -t test-import --build-arg BASE_IMAGE=node:${{ matrix.node }}${{ matrix.platform.distro }} .
- name: Run test
working-directory: ./test-import
run: docker run --platform ${{ matrix.platform.arch }} test-import