Skip to content

Ergonic changes for smaller screens. #95

Ergonic changes for smaller screens.

Ergonic changes for smaller screens. #95

Workflow file for this run

name: Pull Request
on:
workflow_dispatch:
pull_request:
push:
branches: [main]
jobs:
lint:
name: Format & Clippy
runs-on: ubuntu-latest
strategy:
matrix:
toolchain:
- 1.80.1 # MSRV
steps:
- uses: actions/checkout@v2
- uses: Swatinem/rust-cache@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.toolchain }}
override: true
profile: minimal
components: rustfmt, clippy
- name: Run fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- name: Run clippy
if: always()
uses: actions-rs/cargo@v1
with:
command: clippy
args: --all-targets -- -D warnings
unit_tests:
name: Unit Tests on ${{ matrix.toolchain }}
runs-on: ubuntu-latest
strategy:
matrix:
toolchain:
- 1.80.1 # MSRV
steps:
- uses: actions/checkout@v2
- uses: Swatinem/rust-cache@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.toolchain }}
override: true
profile: minimal
- name: Run Unit tests
uses: actions-rs/cargo@v1
with:
command: test
args: --lib
- name: Run Doc tests
uses: actions-rs/cargo@v1
with:
command: test
args: --doc
integration-tests:
runs-on: ubuntu-latest
strategy:
matrix:
toolchain:
- 1.80.1 # MSRV
steps:
- uses: actions/checkout@v2
- uses: Swatinem/rust-cache@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.toolchain }}
override: true
profile: minimal
target: wasm32-unknown-unknown
- uses: jetli/wasm-bindgen-action@v0.1.0
with:
version: 'latest'
- name: Install yarn
run: npm install yarn
- name: Build app
run: yarn run build
# - uses: isbang/compose-action@v1.0.0
# with:
# compose-file: ./docker-compose.yml
# - name: Run Integration tests
# uses: actions-rs/cargo@v1
# with:
# command: test
# args: --test interaction -- --ignored --test-threads=1
site:
name: Deploy site
runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' }}
steps:
- uses: actions/checkout@v2
- uses: Swatinem/rust-cache@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.80.1
override: true
profile: minimal
target: wasm32-unknown-unknown
- uses: jetli/wasm-bindgen-action@v0.1.0
with:
version: 'latest'
- name: Install yarn
run: npm install yarn
- name: Build app
run: yarn run build
- name: Deploy to Netlify
uses: nwtgck/actions-netlify@v1.2
with:
publish-dir: './dist'
github-token: ${{ secrets.GITHUB_TOKEN }}
deploy-message: ${{ github.event.head_commit.message }}
production-deploy: true
production-branch: main
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
timeout-minutes: 5