2020-05-02 18:03:25 +00:00
|
|
|
version: 2.1
|
2018-09-08 15:43:07 +00:00
|
|
|
|
|
|
|
jobs:
|
2020-05-01 11:30:53 +00:00
|
|
|
test:
|
2018-09-08 15:43:07 +00:00
|
|
|
docker:
|
2018-10-19 15:18:40 +00:00
|
|
|
- image: circleci/python:3.7
|
2018-09-08 15:43:07 +00:00
|
|
|
steps:
|
|
|
|
- checkout
|
2020-07-10 13:06:13 +00:00
|
|
|
- run:
|
|
|
|
name: Pull Submodules
|
|
|
|
command: |
|
|
|
|
git submodule init
|
|
|
|
git submodule update --remote
|
2018-09-08 15:43:07 +00:00
|
|
|
- run:
|
2020-04-24 19:31:39 +00:00
|
|
|
name: Install deps
|
|
|
|
command: sudo make dev-install
|
2018-09-09 23:09:11 +00:00
|
|
|
- run:
|
2020-04-24 19:31:39 +00:00
|
|
|
name: Linting
|
|
|
|
command: make format-check
|
2018-09-08 15:43:07 +00:00
|
|
|
- run:
|
2020-04-24 19:31:39 +00:00
|
|
|
name: Run tests
|
|
|
|
command: make test
|
2020-04-24 19:27:18 +00:00
|
|
|
|
2020-05-03 15:16:02 +00:00
|
|
|
deploy:
|
2020-04-24 21:57:03 +00:00
|
|
|
machine:
|
2020-04-24 22:16:35 +00:00
|
|
|
image: ubuntu-1604:201903-01 # https://circleci.com/docs/2.0/configuration-reference/#available-machine-images with Docker 18.09.3
|
2020-04-24 19:27:18 +00:00
|
|
|
steps:
|
|
|
|
- checkout
|
2020-07-10 13:06:13 +00:00
|
|
|
- run:
|
|
|
|
name: Pull Submodules
|
|
|
|
command: |
|
|
|
|
git submodule init
|
|
|
|
git submodule update --remote
|
2020-04-23 11:13:43 +00:00
|
|
|
- add_ssh_keys:
|
|
|
|
fingerprints:
|
|
|
|
- "d3:5f:9d:68:ea:12:9a:42:d3:d3:e1:db:b0:6a:fc:d2"
|
|
|
|
- run:
|
2020-05-03 15:16:02 +00:00
|
|
|
name: Generate new data, push to PokeAPI/api-data's staging branch, if master open a Pull Request towards PokeAPI/api-data's master branch
|
2020-04-23 19:59:36 +00:00
|
|
|
command: bash -x Resources/scripts/updater.sh
|
2018-09-08 15:43:07 +00:00
|
|
|
|
|
|
|
workflows:
|
|
|
|
version: 2
|
2020-05-03 15:16:02 +00:00
|
|
|
test-and-deploy:
|
2018-09-08 15:43:07 +00:00
|
|
|
jobs:
|
2020-05-02 18:03:25 +00:00
|
|
|
- test
|
2020-05-03 15:16:02 +00:00
|
|
|
- deploy:
|
2020-05-02 18:03:25 +00:00
|
|
|
requires:
|
|
|
|
- test
|
2020-05-02 22:16:51 +00:00
|
|
|
filters:
|
|
|
|
branches:
|
2020-05-03 15:16:02 +00:00
|
|
|
only:
|
|
|
|
- master
|
2020-05-13 14:01:54 +00:00
|
|
|
- staging
|
2020-10-04 14:14:34 +00:00
|
|
|
weekly:
|
|
|
|
jobs:
|
|
|
|
- test
|
|
|
|
- deploy:
|
|
|
|
requires:
|
|
|
|
- test
|
|
|
|
triggers:
|
|
|
|
- schedule:
|
|
|
|
cron: "0 0 * * 1"
|
|
|
|
filters:
|
|
|
|
branches:
|
|
|
|
only:
|
|
|
|
- staging
|