enso/gui/.github/workflows/build.yml
Danilo Guanabara 7fba387683 Using Firefox for headless web tests (https://github.com/enso-org/ide/pull/113)
* Using Firefox for headless web tests

* Fixing headless web test command

* Remove unecessary  GitHub Action step


Original commit: 35941c4a68
2020-01-18 22:55:14 -03:00

117 lines
3.2 KiB
YAML

name: Build (MacOS, Linux, Windows)
on: [push]
# Please check if all components are available before updating the rust toolchain version.
# https://rust-lang.github.io/rustup-components-history/x86_64-unknown-linux-gnu.html
jobs:
build:
name: Build
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, macOS-latest, ubuntu-latest]
steps:
- uses: actions/checkout@v1
- name: Install Rust Nightly Toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2019-11-04
override: true
- name: Run cargo check
uses: actions-rs/cargo@v1
with:
command: check
test:
name: Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2019-11-04
override: true
- name: Install wasm-pack
uses: actions-rs/cargo@v1
with:
command: install
args: wasm-pack
- name: Run tests
uses: actions-rs/cargo@v1
with:
command: test
# - name: Install Firefox
# run: sudo apt-get install firefox
- name: Run wasm-pack tests
uses: actions-rs/cargo@v1
with:
command: run
args: >
--manifest-path=script/rust/Cargo.toml
--bin test-all
-- --headless --firefox
# TODO[AO] formatter does not work
# fmt:
# name: Formatter
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v1
# - uses: actions-rs/toolchain@v1
# with:
# toolchain: nightly-2019-11-04
# override: true
# - run: rustup component add rustfmt
# - uses: actions-rs/cargo@v1
# with:
# command: fmt
# args: --all -- --check
clippy:
name: Linter
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2019-11-04
override: true
- run: rustup component add clippy
- uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings
coverage:
name: Coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Install Rust Nightly Toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2019-11-04
override: true
- name: Generate test profile
uses: actions-rs/cargo@v1
with:
command: test
args: --all-features --no-fail-fast
env:
'CARGO_INCREMENTAL': '0'
'RUSTFLAGS': '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Zno-landing-pads'
- name: Generate coverage report
id: coverage
uses: actions-rs/grcov@v0.1
- name: list all /tmp files
run: ls -la /tmp
- name: show the coverage report
run: cat ${{ steps.coverage.outputs.report }}
- name: Upload coverage report
uses: codecov/codecov-action@v1.0.2
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./lcov.info