Skip to content

Update dependencies #361

Update dependencies

Update dependencies #361

Workflow file for this run

name: e2e
on:
push:
branches:
- master
pull_request:
env:
rust: 1.75.0
jobs:
build:
name: e2e build (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
# windows not supported by dfx
include:
- os: ubuntu-latest
binary_path: target/release
build_deps: scripts/workflows/provision-linux-build.sh
- os: macos-latest
binary_path: target/release
build_deps: scripts/workflows/provision-darwin-build.sh
steps:
- uses: actions/checkout@master
- uses: actions/cache@v3
with:
path: |
~/.cargo/git
~/.cargo/registry
target
key: ${{ matrix.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-${{ env.rust }}-ci-1
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ env.rust }}
override: true
# components: rustfmt, clippy
- name: Install dependencies
run: ${{ matrix.build_deps }}
- name: Build release
run: cargo build --release --locked
- name: Upload Artifacts
uses: actions/upload-artifact@v2
with:
name: quill-${{ matrix.os }}-rs-${{ env.rust }}
path: ${{ matrix.binary_path }}/quill
list_tests:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v1
- id: set-matrix
run: |
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
echo "matrix<<$EOF" >> $GITHUB_OUTPUT
scripts/workflows/e2e-matrix.py >> $GITHUB_OUTPUT
echo "$EOF" >> $GITHUB_OUTPUT
test:
runs-on: ${{ matrix.os }}
needs: [build, list_tests]
strategy:
fail-fast: false
matrix: ${{fromJson(needs.list_tests.outputs.matrix)}}
env:
E2E_TEST: tests-${{ matrix.test }}.bash
steps:
- uses: actions/checkout@v1
- name: Download quill binary
uses: actions/download-artifact@v2
with:
name: quill-${{ matrix.os }}-rs-${{ env.rust }}
path: /usr/local/bin
- name: Setup quill binary
run: chmod +x /usr/local/bin/quill
- name: Provision Darwin
if: ${{ contains(matrix.os, 'macos') }}
run: bash scripts/workflows/provision-darwin-e2e.sh
- name: Provision Linux
if: ${{ contains(matrix.os, 'ubuntu') }}
run: bash scripts/workflows/provision-linux-e2e.sh
- name: Prepare environment
run: |
echo "archive=$(pwd)/e2e/archive" >> "$GITHUB_ENV"
echo "assets=$(pwd)/e2e/assets" >> "$GITHUB_ENV"
echo "utils=$(pwd)/e2e/utils" >> "$GITHUB_ENV"
export -p
- name: Run e2e test
run: timeout 2100 bats "e2e/$E2E_TEST"
aggregate:
name: e2e:required
if: ${{ always() }}
needs: [test]
runs-on: ubuntu-latest
steps:
- name: check e2e test result
if: ${{ needs.test.result != 'success' }}
run: exit 1