forked from gatsbyjs/gatsby
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
76 lines (60 loc) · 1.82 KB
/
appveyor.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
platform:
- x64
#TODO, I think we need to create the folder first in the init in case it doesn't exist
#cache:
#- '%AppData%/npm-cache'
#- "%LOCALAPPDATA%/Yarn"
#- C:\Users\appveyor\AppData\Roaming\npm\node_modules\windows-build-tools
skip_branch_with_pr: true
skip_commits:
files:
- docs/**
- www/**
- '**/*.md'
environment:
nodejs_version: "8"
matrix:
- example: gatsbygram
buildon: commit
- example: using-javascript-transforms
buildon: tag
- example: using-remark
buildon: tag
- example: using-contentful
buildon: tag
- example: using-wordpress
buildon: tag
- example: using-mongodb
buildon: tag
- example: using-typescript
buildon: tag
- example: no-plugins
buildon: tag
# Install scripts. (runs after repo cloning)
install:
- echo This example is built on %buildon% and the commit tag is %APPVEYOR_REPO_TAG% and the tag is %APPVEYOR_REPO_TAG_NAME%
# we kill the build for most examples unless it is a release or a forced build
# if you append --build-all to your commit message (not PR) then it will still build all the examples
- ps: |
if (($env:buildon -eq "tag") -and ($env:APPVEYOR_REPO_COMMIT_MESSAGE -ne "Publish") -and ($env:APPVEYOR_REPO_COMMIT_MESSAGE -notlike "* --build-all") -and ($env:APPVEYOR_FORCED_BUILD -ne "True"))
{
Exit-AppVeyorBuild
}
- ps: Install-Product node $env:nodejs_version $env:platform
- choco install yarn --ignore-dependencies
- refreshenv
- echo we are running on %PLATFORM%
- node --version
- yarn global add gatsby-dev-cli@canary
- yarn run bootstrap
- node --version
- yarn test
build_script:
- cd examples/%example%
- yarn install
- gatsby-dev --set-path-to-repo ../..
- gatsby-dev --scan-once
- yarn run build
artifacts:
- path: examples/$(example)
deploy: off