Skip to content

Add example of chaining Results using verbose or backpassing syntax #545

Add example of chaining Results using verbose or backpassing syntax

Add example of chaining Results using verbose or backpassing syntax #545

Workflow file for this run

on:
pull_request:
workflow_dispatch:
name: Test examples on Ubuntu 20.04
jobs:
test-examples:
name: test examples
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: [ubuntu-20.04, ubuntu-22.04]
timeout-minutes: 90
steps:
- uses: actions/checkout@v3
- id: try_fetching_testing_release
continue-on-error: true
run: |
curl -fOL https://github.com/roc-lang/roc/releases/download/nightly/roc_nightly-linux_x86_64-TESTING.tar.gz
- name: There are no TESTING releases, checking regular releases instead
if: steps.try_fetching_testing_release.outcome == 'failure'
run: |
curl -fOL https://github.com/roc-lang/roc/releases/download/nightly/roc_nightly-linux_x86_64-latest.tar.gz
- name: rename nightly tar
run: mv $(ls | grep "roc_nightly.*tar\.gz") roc_nightly.tar.gz
- name: decompress the tar
run: tar -xzf roc_nightly.tar.gz
- run: rm roc_nightly.tar.gz
- name: simplify nightly folder name
run: mv roc_nightly* roc_nightly
- name: get short commit SHA
run: echo "SHORT_COMMIT_SHA=$(./roc_nightly/roc version | grep -oP 'commit \K[a-f0-9]+' )" >> $GITHUB_ENV
- name: get roc repo for static-site-gen platform and its dependencies
run: |
cd roc_nightly
find . -mindepth 1 ! -name 'roc' -exec rm -rf {} +
mkdir gitrepo
cd gitrepo
git clone https://github.com/roc-lang/roc.git
cd roc
git checkout ${{ env.SHORT_COMMIT_SHA }}
mv * ../../
- name: install expect # used to check if output is correct
run: sudo apt install -y expect
- name: print runner CPU
run: lscpu
- name: check if roc files are properly formatted
run: ROC=./roc_nightly/roc ./ci_scripts/check_format.sh
- run: ROC=./roc_nightly/roc ./ci_scripts/all_tests.sh
# segfaults
# - run: ./roc_nightly/roc run main.roc -- examples build