Skip to content

Commit

Permalink
chore: finish setting up CI (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattbretl committed Jan 28, 2019
1 parent 184db00 commit aef3a42
Show file tree
Hide file tree
Showing 4 changed files with 142 additions and 46 deletions.
81 changes: 65 additions & 16 deletions .circleci/config.yml
@@ -1,6 +1,6 @@
version: 2
jobs:
build:
node8.6_pg9.6:
docker:
- image: circleci/node:8.6
- image: circleci/postgres:9.6-alpine
Expand All @@ -9,27 +9,76 @@ jobs:
POSTGRES_DB: circle_test
steps:
- checkout
- run: sudo apt update
- run: sudo apt install -y postgresql-client
- restore_cache:
key: node-modules-{{ checksum "yarn.lock" }}
keys:
- yarn-packages-{{ checksum "yarn.lock" }}
- run:
name: install
command: |
yarn install
sudo apt-get install postgresql-client
command: yarn install --frozen-lockfile
- save_cache:
key: node-modules-{{ checksum "yarn.lock" }}
key: yarn-packages-{{ checksum "yarn.lock" }}
paths:
- ./node_modules
- ~/.cache/yarn
- run: yarn lint
- run:
name: lint
command: yarn lint
command: yarn test
environment:
TEST_DATABASE_URL: postgres://circleci@localhost:5432/circle_test
node10_pg10:
docker:
- image: circleci/node:10
- image: circleci/postgres:10-alpine
environment:
POSTGRES_USER: circleci
POSTGRES_DB: circle_test
steps:
- checkout
- run: sudo apt update
- run: sudo apt install -y postgresql-client
- restore_cache:
keys:
- yarn-packages-{{ checksum "yarn.lock" }}
- run:
command: yarn install --frozen-lockfile
- save_cache:
key: yarn-packages-{{ checksum "yarn.lock" }}
paths:
- ~/.cache/yarn
- run: yarn lint
- run:
command: yarn test
environment:
TEST_DATABASE_URL: postgres://circleci@localhost:5432/circle_test
node10_pg11:
docker:
- image: circleci/node:10
- image: circleci/postgres:11-alpine
environment:
POSTGRES_USER: circleci
POSTGRES_DB: circle_test
steps:
- checkout
- run: sudo apt update
- run: sudo apt install -y postgresql-client
- restore_cache:
keys:
- yarn-packages-{{ checksum "yarn.lock" }}
- run:
command: yarn install --frozen-lockfile
- save_cache:
key: yarn-packages-{{ checksum "yarn.lock" }}
paths:
- ~/.cache/yarn
- run: yarn lint
- run:
name: test
command: yarn test
environment:
TEST_DATABASE_URL: postgres://circleci@localhost:5432/circle_test
- store_artifacts:
path: test-results.xml
prefix: tests
- store_test_results:
path: test-results.xml
workflows:
version: 2
test:
jobs:
- node8.6_pg9.6
- node10_pg10
- node10_pg11
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -28,7 +28,7 @@
"graphql": "^0.10.5",
"jest": "^20.0.4",
"pg": ">=6.1.0 <8",
"postgraphile-core": "^4.0.0-beta.6",
"postgraphile-core": "4.0.0",
"prettier": "^1.4.4"
},
"jest": {
Expand Down
1 change: 0 additions & 1 deletion scripts/test
Expand Up @@ -16,7 +16,6 @@ fi;

# Import latest schema (throw on error)
psql -Xqv ON_ERROR_STOP=1 -f __tests__/plugin-test-schema.sql "$TEST_DATABASE_URL"
clear
echo "Database reset successfully ✅"

# Now run the tests
Expand Down
104 changes: 76 additions & 28 deletions yarn.lock
Expand Up @@ -2,6 +2,31 @@
# yarn lockfile v1


"@types/graphql@^0.13.4":
version "0.13.4"
resolved "https://registry.yarnpkg.com/@types/graphql/-/graphql-0.13.4.tgz#55ae9c29f0fd6b85ee536f5c72b4769d5c5e06b1"
integrity sha512-B4yel4ro2nTb3v0pYO8vO6SjgvFJSrwUY+IO6TUSLdOSB+gQFslylrhRCHxvXMIhxB71mv5PEE9dAX+24S8sew==

"@types/node@*":
version "10.12.18"
resolved "https://registry.yarnpkg.com/@types/node/-/node-10.12.18.tgz#1d3ca764718915584fcd9f6344621b7672665c67"
integrity sha512-fh+pAqt4xRzPfqA6eh3Z2y6fyZavRIumvjhaCL753+TVkGKGhpPeyrJG2JftD0T9q4GF00KjefsQ+PQNDdWQaQ==

"@types/pg-types@*":
version "1.11.4"
resolved "https://registry.yarnpkg.com/@types/pg-types/-/pg-types-1.11.4.tgz#8d7c59fb509ce3dca3f8bae589252051c639a9a8"
integrity sha512-WdIiQmE347LGc1Vq3Ki8sk3iyCuLgnccqVzgxek6gEHp2H0p3MQ3jniIHt+bRODXKju4kNQ+mp53lmP5+/9moQ==
dependencies:
moment ">=2.14.0"

"@types/pg@^7.4.10":
version "7.4.11"
resolved "https://registry.yarnpkg.com/@types/pg/-/pg-7.4.11.tgz#dcc560e89c17d859c83c91ad3faf60bfeacaad6c"
integrity sha512-Eksj2yOBNHnNqLuU1AqwF1qXgdaYDcWVH1ZQlxS7k1i34+JZd/ZNd15ugIpTVQxmBBMqjliJstmrnusjXy08Tg==
dependencies:
"@types/node" "*"
"@types/pg-types" "*"

abab@^1.0.3:
version "1.0.4"
resolved "https://registry.yarnpkg.com/abab/-/abab-1.0.4.tgz#5faad9c2c07f60dd76770f71cf025b62a63cfd4e"
Expand Down Expand Up @@ -1146,37 +1171,43 @@ graceful-fs@^4.1.11, graceful-fs@^4.1.2:
version "4.1.11"
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658"

graphile-build-pg@4.0.0-beta.6:
version "4.0.0-beta.6"
resolved "https://registry.yarnpkg.com/graphile-build-pg/-/graphile-build-pg-4.0.0-beta.6.tgz#9ba7d7ea2a19273c34446b3e8ec4a88fdb80121f"
graphile-build-pg@4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/graphile-build-pg/-/graphile-build-pg-4.0.0.tgz#0c09b9e1adeb24f55bf73437abb3b740f18abcc5"
integrity sha512-vj6nYl+Rcl+psqlJYVyO0S6eBNpCosyWcJHUQgPAFMTff59PqSeEugm/6GWfW1QvEiPYKkdKn4LaF0bWWZEU1Q==
dependencies:
chalk "^2.1.0"
debug ">=2 <3"
graphile-build "4.0.0-beta.6"
graphile-build "4.0.0"
graphql-iso-date "^3.2.0"
jsonwebtoken "^8.1.1"
lodash ">=4 <5"
lru-cache "4.1.1"
pg-sql2 "2.0.0"
postgres-interval "1.1.1"
lru-cache ">=4 <5"
pg-sql2 "2.2.1"
postgres-interval "^1.1.1"

graphile-build@4.0.0-beta.6:
version "4.0.0-beta.6"
resolved "https://registry.yarnpkg.com/graphile-build/-/graphile-build-4.0.0-beta.6.tgz#d3f15b16213c15728e72cfaa3adc733c690726a4"
graphile-build@4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/graphile-build/-/graphile-build-4.0.0.tgz#d9033ffcb7e25950bd82551f2906ce2ca2d5099d"
integrity sha512-FYRGriuWNytHknpnJhZRzBeAJ3DEtGUaK5HrwQYgazGzPSeEuzAK2wCtEm8bhuvhBfjpIgQ7s6l3qIg6k6O/xQ==
dependencies:
"@types/graphql" "^0.13.4"
debug ">=2 <3"
graphql-parse-resolve-info "4.0.0-beta.6"
graphql-parse-resolve-info "4.0.0"
lodash ">=4 <5"
pluralize "7.0.0"
lru-cache ">=4 <5"
pluralize "^7.0.0"

graphql-iso-date@^3.2.0:
version "3.5.0"
resolved "https://registry.yarnpkg.com/graphql-iso-date/-/graphql-iso-date-3.5.0.tgz#55a1be0efa8d28c1453afd2eb5ce1d052189a513"

graphql-parse-resolve-info@4.0.0-beta.6:
version "4.0.0-beta.6"
resolved "https://registry.yarnpkg.com/graphql-parse-resolve-info/-/graphql-parse-resolve-info-4.0.0-beta.6.tgz#daa2e492617e5d6abde2ef0fb535403fcadecca0"
graphql-parse-resolve-info@4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/graphql-parse-resolve-info/-/graphql-parse-resolve-info-4.0.0.tgz#c823e67034c0beba150a4c9365342a107e4272a7"
integrity sha512-MgQIivO0mJ1AhgkMjpvSzsGiH3ZsJ2HXvE9vWhp4Hh2S4TjidI4M/caM+GoIwo58kwBNAVEw/Tl+0t7/jxm1Cw==
dependencies:
"@types/graphql" "^0.13.4"
debug ">=2 <3"

graphql@^0.10.5:
Expand Down Expand Up @@ -2054,9 +2085,10 @@ loose-envify@^1.0.0:
dependencies:
js-tokens "^3.0.0"

lru-cache@4.1.1:
version "4.1.1"
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.1.tgz#622e32e82488b49279114a4f9ecf45e7cd6bba55"
"lru-cache@>=4 <5":
version "4.1.5"
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.5.tgz#8bbe50ea85bed59bc9e33dcab8235ee9bcf443cd"
integrity sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==
dependencies:
pseudomap "^1.0.2"
yallist "^2.1.2"
Expand Down Expand Up @@ -2173,6 +2205,11 @@ mkdirp@^0.5.1:
dependencies:
minimist "0.0.8"

moment@>=2.14.0:
version "2.24.0"
resolved "https://registry.yarnpkg.com/moment/-/moment-2.24.0.tgz#0d055d53f5052aa653c9f6eb68bb5d12bf5c2b5b"
integrity sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg==

ms@2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"
Expand Down Expand Up @@ -2410,10 +2447,12 @@ pg-pool@~2.0.3:
version "2.0.3"
resolved "https://registry.yarnpkg.com/pg-pool/-/pg-pool-2.0.3.tgz#c022032c8949f312a4f91fb6409ce04076be3257"

pg-sql2@2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/pg-sql2/-/pg-sql2-2.0.0.tgz#9b89c0fc31d99450f08777d5b3501e27f81d3d2e"
pg-sql2@2.2.1:
version "2.2.1"
resolved "https://registry.yarnpkg.com/pg-sql2/-/pg-sql2-2.2.1.tgz#a37612e5243887c5135a6849dec1f20b2cf00553"
integrity sha512-S4XyLvUJv/rUMNk4+4LuT7S/aWKlQifi6ekHeshNWn0FZJxq5t4qw2VzCfbTNM3mQN7c9B6rM01FcnbRI37Y2Q==
dependencies:
"@types/pg" "^7.4.10"
debug ">=2 <3"

pg-types@~1.12.1:
Expand Down Expand Up @@ -2457,20 +2496,22 @@ pinkie@^2.0.0:
version "2.0.4"
resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870"

pluralize@7.0.0, pluralize@^7.0.0:
pluralize@^7.0.0:
version "7.0.0"
resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-7.0.0.tgz#298b89df8b93b0221dbf421ad2b1b1ea23fc6777"

posix-character-classes@^0.1.0:
version "0.1.1"
resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab"

postgraphile-core@^4.0.0-beta.6:
version "4.0.0-beta.6"
resolved "https://registry.yarnpkg.com/postgraphile-core/-/postgraphile-core-4.0.0-beta.6.tgz#f7427ae22e2efd8b549d512603e1b075cc9321ab"
postgraphile-core@4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/postgraphile-core/-/postgraphile-core-4.0.0.tgz#252cc56caec4eac32c6244e9e2a1947de5302549"
integrity sha512-dUwC6RjY8v/oZfcINMtVXAoUgZBLrvt2BPzQWtyMZ0dH8+vsmz8UNI+uwO2Stlo4dWXClF+LXlQ24LCzNCvwbw==
dependencies:
graphile-build "4.0.0-beta.6"
graphile-build-pg "4.0.0-beta.6"
"@types/graphql" "^0.13.4"
graphile-build "4.0.0"
graphile-build-pg "4.0.0"

postgres-array@~1.0.0:
version "1.0.2"
Expand All @@ -2484,12 +2525,19 @@ postgres-date@~1.0.0:
version "1.0.3"
resolved "https://registry.yarnpkg.com/postgres-date/-/postgres-date-1.0.3.tgz#e2d89702efdb258ff9d9cee0fe91bd06975257a8"

postgres-interval@1.1.1, postgres-interval@^1.1.0:
postgres-interval@^1.1.0:
version "1.1.1"
resolved "https://registry.yarnpkg.com/postgres-interval/-/postgres-interval-1.1.1.tgz#acdb0f897b4b1c6e496d9d4e0a853e1c428f06f0"
dependencies:
xtend "^4.0.0"

postgres-interval@^1.1.1:
version "1.1.2"
resolved "https://registry.yarnpkg.com/postgres-interval/-/postgres-interval-1.1.2.tgz#bf71ff902635f21cb241a013fc421d81d1db15a9"
integrity sha512-fC3xNHeTskCxL1dC8KOtxXt7YeFmlbTYtn7ul8MkVERuTmf7pI4DrkAxcw3kh1fQ9uz4wQmd03a1mRiXUZChfQ==
dependencies:
xtend "^4.0.0"

prelude-ls@~1.1.2:
version "1.1.2"
resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54"
Expand Down

0 comments on commit aef3a42

Please sign in to comment.