add tests to stack workflow #13
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: Stack CI | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
permissions: | |
contents: read | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: haskell-actions/setup@v2 | |
with: | |
ghc-version: '9.2.5' | |
enable-stack: true | |
stack-version: 'latest' | |
# install z3 | |
- name: Setup Z3 | |
id: z3 | |
uses: cda-tum/setup-z3@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- uses: actions/cache@v1 | |
name: Cache .stack-work | |
with: | |
path: .stack-work | |
key: stack-work | |
- uses: actions/cache@v1 | |
name: Cache ~/.stack | |
with: | |
path: ~/.stack | |
key: stack | |
- name: Build | |
run: stack build | |
- name: Run fast tests | |
run: stack test salsa20:test:salsa20-fast-unit-tests | |
- name: Run ECRYPT 128 bits key size tests | |
run: stack test salsa20:test:salsa20-ecrypt128-test | |
- name: Run ECRYPT 256 bits key size tests | |
run: stack test salsa20:test:alsa20-ecrypt256-tests | |
- name: Run display tests | |
run: stack test salsa20:test:salsa20-display-unit-tests |