Skip to content

ci: Don't need to download ghc twice #15

ci: Don't need to download ghc twice

ci: Don't need to download ghc twice #15

Workflow file for this run

name: Build
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: start service container
run: |
docker run --rm -d --name minio -p 9000:9000 \
-e MINIO_ROOT_USER=minioadmin \
-e MINIO_ROOT_PASSWORD=minioadmin \
quay.io/minio/minio server /data
sleep 3
curl -s -D- http://localhost:9000
- uses: actions/checkout@v2
- uses: haskell-actions/setup@v2
with:
enable-stack: true
stack-version: 'latest'
- name: Cache
uses: actions/cache@v1
env:
cache-name: cache-stack
with:
path: ~/.stack
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/*.cabal') }}-${{ hashFiles('**/stack.yaml') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Build dependencies
run: |
stack --no-terminal build --test --only-dependencies
- name: Build
run: |
mkdir dist
stack --no-terminal build --test --no-run-tests --copy-bins --local-bin-path dist
- name: Test
run: |
export TASKRUNNER_TEST_S3_ENDPOINT=http://localhost:9000
export TASKRUNNER_TEST_S3_ACCESS_KEY=minioadmin
export TASKRUNNER_TEST_S3_SECRET_KEY=minioadmin
stack --no-terminal build --test
- name: Zip
run: |
cd dist
tar czvf taskrunner-linux.tar.gz taskrunner
- name: Archive production artifacts
uses: actions/upload-artifact@v2
with:
name: taskrunner-linux.tar.gz
path: |
dist/taskrunner-linux.tar.gz