2020-06-10 19:55:40 +09:00
|
|
|
name: Musl
|
|
|
|
|
|
|
|
on: [push, pull_request]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
name: stable - x86_64-unknown-linux-musl - node@${{ matrix.node }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2020-06-17 21:39:30 +09:00
|
|
|
node: ['10', '12', '14']
|
2020-06-10 19:55:40 +09:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Log in to registry
|
|
|
|
run: |
|
|
|
|
docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD $DOCKER_REGISTRY_URL
|
|
|
|
env:
|
|
|
|
DOCKER_REGISTRY_URL: docker.pkg.github.com
|
|
|
|
DOCKER_USERNAME: ${{ github.actor }}
|
|
|
|
DOCKER_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
|
|
|
|
- name: Pull docker image
|
|
|
|
run: |
|
|
|
|
docker pull docker.pkg.github.com/napi-rs/napi-rs/rust-nodejs-alpine:lts
|
|
|
|
docker tag docker.pkg.github.com/napi-rs/napi-rs/rust-nodejs-alpine:lts builder
|
|
|
|
|
|
|
|
- name: Run check
|
|
|
|
run: |
|
|
|
|
docker run --rm -v $(pwd)/.cargo:/root/.cargo -v $(pwd):/napi-rs -w /napi-rs builder cargo check --all --bins --examples --tests -vvv
|
|
|
|
|
|
|
|
- name: Run tests
|
|
|
|
run: |
|
2020-07-15 01:43:20 +09:00
|
|
|
docker run --rm -v $(pwd)/.cargo:/root/.cargo -v $(pwd):/napi-rs -w /napi-rs builder cargo test -p napi-sys --lib -- --nocapture
|
2020-06-10 19:55:40 +09:00
|
|
|
|
2020-06-17 21:33:28 +09:00
|
|
|
- name: Unit test
|
2020-06-10 19:55:40 +09:00
|
|
|
run: |
|
2020-06-17 21:33:28 +09:00
|
|
|
docker run --rm -v $(pwd)/.cargo:/root/.cargo -v $(pwd):/napi-rs -w /napi-rs builder sh -c "yarn && yarn --cwd ./test_module build && yarn test"
|
2020-06-10 19:55:40 +09:00
|
|
|
env:
|
|
|
|
RUST_BACKTRACE: 1
|