image: docker-registry.xx.network/elixxir/sysadmin/backend-ci:go1.17-wasm

build:
  stage: build
  script:
    - go mod vendor -v
    - mkdir -p release
    - GOOS=js GOARCH=wasm go build -ldflags '-w -s' -o release/xxdk.wasm main.go
  artifacts:
    paths:
      - release/

#native-test:
#    stage: test
#    script:
#        - go test ./...

wasm-test:
  stage: test
  script:
    - export PATH=/root/go/bin:$PATH
    - GOOS=js GOARCH=wasm go test ./...
