mirror of
https://github.com/ilyakooo0/sc-build.git
synced 2024-11-23 20:39:24 +03:00
added readme
This commit is contained in:
parent
11eeda36b4
commit
08b0dd20f4
47
README.md
47
README.md
@ -4,6 +4,53 @@ Need both manual weebohook and app.
|
|||||||
|
|
||||||
Installation id needs to be configured manually.
|
Installation id needs to be configured manually.
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
You want to have some predefined docker container with maximum dependencies cached.
|
||||||
|
|
||||||
|
|
||||||
|
Exmaple:
|
||||||
|
|
||||||
|
```dockerfile
|
||||||
|
FROM fpco/stack-build:lts-14.27
|
||||||
|
|
||||||
|
RUN stack update
|
||||||
|
RUN stack build tasty tasty-hspec aeson containers bytestring
|
||||||
|
|
||||||
|
WORKDIR /
|
||||||
|
```
|
||||||
|
|
||||||
|
You need to build that container and git it a name:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker build -t fast-lts-14.27 - < FastDockerFile
|
||||||
|
```
|
||||||
|
|
||||||
|
After that you can use it in your `tasks.yaml`:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
test-task:
|
||||||
|
prebuild: |
|
||||||
|
cp -f ../../test-task/package.yaml .
|
||||||
|
cp -f ../../test-task/stack.yaml .
|
||||||
|
cp -f -R ../../test-task/test .
|
||||||
|
dockerfile: |
|
||||||
|
FROM fast-lts-14.27
|
||||||
|
COPY . src
|
||||||
|
WORKDIR /src
|
||||||
|
ENTRYPOINT stack test --fast
|
||||||
|
timeoutMinutes: 10
|
||||||
|
```
|
||||||
|
|
||||||
|
The docker container is expected to write json to stdout, conating test results:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"test1": true,
|
||||||
|
"test2": false
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
For macos docker API:
|
For macos docker API:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
Loading…
Reference in New Issue
Block a user