Skip to content

.github/workflows/ci.yml #226

.github/workflows/ci.yml

.github/workflows/ci.yml #226

Workflow file for this run

on:
pull_request:
workflow_dispatch:
# this cancels workflows currently in progress if you start a new one
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-and-test:
runs-on: [ubuntu-20.04]
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-linuxTESTING_x86_64-latest.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
# <-- START BUILD TESTS
- run: ./roc_nightly/roc build ./file-testBROKEN.roc
# linker=legacy because 3609
- run: ./roc_nightly/roc build ./examples/args.roc --linker=legacy
- run: ./roc_nightly/roc build ./examples/countdown.roc
- run: ./roc_nightly/roc build ./examples/echo.roc
- run: ./roc_nightly/roc build ./examples/env.roc
- run: ./roc_nightly/roc build ./examples/file-read.roc
- run: ./roc_nightly/roc build ./examples/file-mixedBROKEN.roc
- run: ./roc_nightly/roc build ./examples/form.roc
- run: ./roc_nightly/roc build ./examples/http-get.roc
# END BUILD TESTS -->
- run: sudo apt install -y expect ncat
# expect for testsing
# ncat for tcp-client example
# <-- START RUN TESTS
- run: expect -v
- run: expect ci/expect_scripts/args.exp
- run: expect ci/expect_scripts/countdown.exp
- run: expect ci/expect_scripts/echo.exp
- run: expect ci/expect_scripts/env.exp
- run: expect ci/expect_scripts/form.exp
- run: expect ci/expect_scripts/file-read.exp
- run: expect ci/expect_scripts/http-get.exp
- run: expect ci/expect_scripts/tcp-client.exp
# <-- END RUN TESTS
# TODO clippy, rustfmt, roc fmt check