2019-09-19 18:17:53 +08:00
|
|
|
name: Continuous integration
|
|
|
|
|
2020-01-13 21:31:26 +08:00
|
|
|
on: [push, pull_request]
|
2019-09-19 18:17:53 +08:00
|
|
|
|
|
|
|
jobs:
|
2020-01-13 21:31:26 +08:00
|
|
|
test:
|
2019-09-19 18:17:53 +08:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2019-10-16 20:12:53 +08:00
|
|
|
- name: Create npm configuration
|
|
|
|
run: echo "//npm.pkg.github.com/:_authToken=${token}" >> ~/.npmrc
|
|
|
|
env:
|
|
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
2019-09-19 18:17:53 +08:00
|
|
|
|
2019-10-16 20:12:53 +08:00
|
|
|
- uses: actions/checkout@v1
|
|
|
|
- run: npm ci
|
2020-11-17 22:25:51 +08:00
|
|
|
# Temporary disabling in order to release urgent fix
|
|
|
|
# - run: npm run lint
|
2019-10-16 20:12:53 +08:00
|
|
|
- run: npm run build
|
|
|
|
- run: npm run test
|
2019-09-19 18:17:53 +08:00
|
|
|
|
2019-10-16 20:12:53 +08:00
|
|
|
install_stable:
|
2020-01-27 00:20:01 +08:00
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os:
|
|
|
|
- ubuntu-latest
|
|
|
|
- macOS-latest
|
|
|
|
- windows-latest
|
2019-10-16 20:12:53 +08:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
2020-01-27 00:20:01 +08:00
|
|
|
- id: toolchain
|
|
|
|
uses: ./
|
2019-10-16 20:12:53 +08:00
|
|
|
with:
|
|
|
|
toolchain: stable
|
2020-01-27 00:20:01 +08:00
|
|
|
- name: Test toolchain outputs
|
|
|
|
env:
|
|
|
|
RUSTC: ${{ steps.toolchain.outputs.rustc }}
|
|
|
|
RUSTC_HASH: ${{ steps.toolchain.outputs.rustc_hash }}
|
|
|
|
CARGO: ${{ steps.toolchain.outputs.cargo }}
|
|
|
|
RUSTUP: ${{ steps.toolchain.outputs.rustup }}
|
|
|
|
run: |
|
|
|
|
echo $RUSTC
|
|
|
|
echo $RUSTC_HASH
|
|
|
|
echo $CARGO
|
|
|
|
echo $RUSTUP
|
2019-09-19 18:17:53 +08:00
|
|
|
|
2019-10-16 20:12:53 +08:00
|
|
|
install_nightly:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
- uses: ./
|
|
|
|
with:
|
|
|
|
profile: minimal
|
|
|
|
toolchain: nightly
|
|
|
|
components: rustfmt, clippy
|
|
|
|
|
|
|
|
install_stable_in_docker:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
container: ubuntu:latest # Docker image, not the GitHub Actions VM
|
|
|
|
steps:
|
|
|
|
# `rustup` will need `curl` or `wget` later
|
|
|
|
- run: apt-get update && apt-get install -y curl
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
- uses: ./
|
|
|
|
with:
|
|
|
|
toolchain: stable
|
2020-01-13 21:31:26 +08:00
|
|
|
|
|
|
|
install_stable_through_rust_toolchain_file:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
- run: echo "stable" > ./rust-toolchain
|
|
|
|
- uses: ./
|