chore: Release 0.5.1 (#245) #485
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: e2e | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
jobs: | |
build: | |
name: e2e build (${{ matrix.os }}) | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
# windows not supported by dfx | |
include: | |
- os: ubuntu-22.04 | |
binary_path: target/release | |
build_deps: scripts/workflows/provision-linux-build.sh | |
- os: macos-14-large | |
binary_path: target/release | |
build_deps: scripts/workflows/provision-darwin-build.sh | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo/git | |
~/.cargo/registry | |
target | |
key: ${{ matrix.os }}-cargo-${{ hashFiles('**/Cargo.lock', 'rust-toolchain.toml') }}-ci-1 | |
- name: Install dependencies | |
run: ${{ matrix.build_deps }} | |
- name: Build release | |
run: cargo build --release --locked | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: quill-${{ matrix.os }}-rs | |
path: ${{ matrix.binary_path }}/quill | |
list_tests: | |
runs-on: ubuntu-latest | |
outputs: | |
matrix: ${{ steps.set-matrix.outputs.matrix }} | |
steps: | |
- uses: actions/checkout@v4 | |
- 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@v4 | |
- name: Download quill binary | |
uses: actions/download-artifact@v4 | |
with: | |
name: quill-${{ matrix.os }}-rs | |
path: /usr/local/bin | |
- name: Setup quill binary | |
run: chmod +x /usr/local/bin/quill | |
- name: Install dfx | |
uses: dfinity/setup-dfx@main | |
- 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 |