1
1
mirror of https://github.com/anoma/juvix.git synced 2024-12-12 04:43:18 +03:00
juvix/tests/smoke/Commands/html.smoke.yaml
Jonathan Cubides 807b3b1770
Update CI to install Smoke, Github actions, and Makefile fixes (#1735)
This PR adds some maintenance at different levels to the CI config, the
Make file, and formatting.

- Most of the actions used by the CI related to haskell, ormolu, hlint
and pre-commit have been updated because Github requires NodeJS 16. This
change removes all the old warnings related to nodeJs.
In the case of ormolu, the new version makes us format some files that
were not formatted before, similarly with hlint.
- The CI has been updated to use the latest version of the Smoke testing
framework, which introduced installation of the dependencies for Linux
(libicu66) and macOS (icu4c) in the CI. In the case of macOS, the CI
uses a binary for smoke. For Linux, we use stack to build smoke from the
source. The source here is in a fork of [the official Smoke
repo](https://github.com/SamirTalwar/smoke). Such includes some
features/changes that are not yet in the official repo.

- The Makefile runs the ormolu and hlint targets using as a path for the
binaries the environment variables ORMOLU and HLINT. Thus, export those
variables in your environment before running `make check,` `make format`
or `make hlint`. Otherwise, the Makefile will use the binaries provided
by `stack`.

Co-authored-by: Paul Cadman <git@paulcadman.dev>
2023-01-24 11:50:23 +01:00

147 lines
4.3 KiB
YAML

working-directory: ./../../../examples/
tests:
- name: html-stdout
command:
shell:
- bash
script: |
cd milestone/ValidityPredicates
juvix html SimpleFungibleToken.juvix --only-source
cat html/SimpleFungibleToken.html
stdout:
contains:
<!DOCTYPE HTML>
exit-status: 0
- name: output-dir
command:
shell:
- bash
script: |
rm -rf html
juvix html milestone/ValidityPredicates/SimpleFungibleToken.juvix --only-source --output-dir=html --non-recursive
[ -d html/assets ]
[ -f html/SimpleFungibleToken.html ]
stdout:
matches: |
Copying assets files to .*
Writing .*SimpleFungibleToken.html
exit-status: 0
- name: recursive-generation
command:
shell:
- bash
script: |
rm -rf html
juvix html milestone/ValidityPredicates/SimpleFungibleToken.juvix --only-source --output-dir=html
(ls html | wc -l)
cd html
[ -f Stdlib.Data.Ord.html ]
[ -f Stdlib.Data.String.html ]
[ -f Stdlib.Data.Nat.html ]
[ -f Stdlib.System.IO.html ]
[ -f Stdlib.Function.html ]
[ -f Stdlib.Data.List.html ]
[ -f Stdlib.Data.String.Ord.html ]
[ -f Stdlib.Data.Product.html ]
[ -f Data.Int.Ops.html ]
[ -f Stdlib.Data.Maybe.html ]
[ -f Data.Int.html ]
[ -f Stdlib.Data.Bool.html ]
[ -f Stdlib.Prelude.html ]
[ -f Anoma.Base.html ]
[ -f SimpleFungibleToken.html ]
[ -f assets/css/source-ayu-light.css ]
[ -f assets/css/source-nord.css ]
[ -f assets/images/tara-magicien.png ]
[ -f assets/images/tara-seating.svg ]
[ -f assets/images/tara-smiling.png ]
[ -f assets/images/tara-smiling.svg ]
[ -f assets/images/tara-teaching.png ]
[ -f assets/images/tara-teaching.svg ]
[ -f assets/js/highlight.js ]
[ -f assets/js/tex-chtml.js ]
stdout:
contains: |
SimpleFungibleToken.html
exit-status: 0
- name: judoc-assets
command:
shell:
- bash
script: |
rm -rf html
juvix html milestone/ValidityPredicates/SimpleFungibleToken.juvix --output-dir=html
(ls html | wc -l)
cd html
[ -f Stdlib.Data.Ord.html ]
[ -f Stdlib.Data.String.html ]
[ -f Stdlib.Data.Nat.html ]
[ -f Stdlib.System.IO.html ]
[ -f Stdlib.Function.html ]
[ -f Stdlib.Data.List.html ]
[ -f Stdlib.Data.String.Ord.html ]
[ -f Stdlib.Data.Product.html ]
[ -f Data.Int.Ops.html ]
[ -f Stdlib.Data.Maybe.html ]
[ -f Data.Int.html ]
[ -f Stdlib.Data.Bool.html ]
[ -f Stdlib.Prelude.html ]
[ -f Anoma.Base.html ]
[ -f SimpleFungibleToken.html ]
[ -f assets/css/source-ayu-light.css ]
[ -f assets/css/source-nord.css ]
[ -f assets/css/linuwial.css ]
[ -f assets/images/tara-magicien.png ]
[ -f assets/images/tara-seating.svg ]
[ -f assets/images/tara-smiling.png ]
[ -f assets/images/tara-smiling.svg ]
[ -f assets/images/tara-teaching.png ]
[ -f assets/images/tara-teaching.svg ]
[ -f assets/js/highlight.js ]
[ -f assets/js/tex-chtml.js ]
stdout:
contains: |
SimpleFungibleToken.html
exit-status: 0
- name: non-recursive-generation
command:
shell:
- bash
script: |
rm -rf html
juvix html milestone/ValidityPredicates/SimpleFungibleToken.juvix --output-dir=html --non-recursive
(ls html | wc -l)
cd html
[ -d assets ]
[ -f SimpleFungibleToken.html ]
stdout:
matches: |
Copying assets files to .*
Writing .*SimpleFungibleToken.html
\s*4
exit-status: 0
- name: non-recursive-generation-only-source
command:
shell:
- bash
script: |
rm -rf html
juvix html milestone/ValidityPredicates/SimpleFungibleToken.juvix --output-dir=html --non-recursive --only-source
(ls html | wc -l)
cd html
[ -d assets/ ]
[ -f SimpleFungibleToken.html ]
stdout:
matches: |
Copying assets files to .*
Writing .*SimpleFungibleToken.html
\s*2
exit-status: 0