Skip to content

Workflow file for this run

name: Test
on:
push:
branches: [ ci ]
pull_request:
branches: [ ci ]
env:
CARGO_TERM_COLOR: always
GITHUB_ACTIONS: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Build
uses: actions/checkout@v3
run: ./build-in-docker.sh
- name: Upload binary
uses: actions/upload-artifact@v3
with:
name: sweat-jar
path: res/sweat_jar.wasm
unit-tests:
needs: [ build ]
runs-on: ubuntu-latest
steps:
- name: Unit tests
uses: actions/checkout@v3
run: cargo test --all
integration-tests:
needs: [ build ]
runs-on: ubuntu-latest
steps:
- name: Download binary
uses: actions/download-artifact@v3
with:
name: sweat-jar
path: res/sweat_jar.wasm
- name: Integration tests
uses: actions/checkout@v3
run: cargo run -p integration-tests
push:
needs: [ unit-tests, integration-tests ]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Download binary
uses: actions/download-artifact@v3
with:
name: sweat-jar
path: res/sweat_jar.wasm
- name: Commit & Push changes
uses: actions-js/push@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}