2020-05-02 20:03:25 +02:00
|
|
|
version: 2.1
|
2018-09-08 11:43:07 -04:00
|
|
|
|
|
|
|
jobs:
|
2020-05-01 13:30:53 +02:00
|
|
|
test:
|
2018-09-08 11:43:07 -04:00
|
|
|
docker:
|
2023-01-08 19:10:15 +01:00
|
|
|
- image: cimg/python:3.10.9
|
2018-09-08 11:43:07 -04:00
|
|
|
steps:
|
|
|
|
- checkout
|
2020-07-10 15:06:13 +02:00
|
|
|
- run:
|
|
|
|
name: Pull Submodules
|
|
|
|
command: |
|
|
|
|
git submodule init
|
|
|
|
git submodule update --remote
|
2018-09-08 11:43:07 -04:00
|
|
|
- run:
|
2020-04-24 21:31:39 +02:00
|
|
|
name: Install deps
|
2021-12-27 15:15:41 +01:00
|
|
|
command: make dev-install
|
2018-09-10 09:09:11 +10:00
|
|
|
- run:
|
2020-04-24 21:31:39 +02:00
|
|
|
name: Linting
|
|
|
|
command: make format-check
|
2018-09-08 11:43:07 -04:00
|
|
|
- run:
|
2020-04-24 21:31:39 +02:00
|
|
|
name: Run tests
|
|
|
|
command: make test
|
2024-05-06 13:23:30 +02:00
|
|
|
- run:
|
|
|
|
name: Generate OpenAPI schema
|
|
|
|
command: make openapi-generate
|
2023-02-06 12:15:23 +01:00
|
|
|
build:
|
|
|
|
docker:
|
|
|
|
- image: cimg/python:3.10.9
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- run:
|
|
|
|
name: Pull Submodules
|
|
|
|
command: |
|
|
|
|
git submodule init
|
|
|
|
git submodule update --remote
|
|
|
|
- run:
|
|
|
|
name: Install deps
|
|
|
|
command: make install
|
|
|
|
- run:
|
|
|
|
name: Run migrations
|
|
|
|
command: make setup
|
|
|
|
- run:
|
|
|
|
name: Build database
|
|
|
|
command: make build-db
|
2020-05-03 17:16:02 +02:00
|
|
|
deploy:
|
2020-04-24 23:57:03 +02:00
|
|
|
machine:
|
2023-12-13 02:36:44 +01:00
|
|
|
image: ubuntu-2204:2023.10.1
|
2023-01-08 19:12:39 +01:00
|
|
|
resource_class: large
|
2020-04-24 21:27:18 +02:00
|
|
|
steps:
|
|
|
|
- checkout
|
2020-07-10 15:06:13 +02:00
|
|
|
- run:
|
|
|
|
name: Pull Submodules
|
|
|
|
command: |
|
|
|
|
git submodule init
|
|
|
|
git submodule update --remote
|
2020-04-23 13:13:43 +02: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 17:16:02 +02: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 21:59:36 +02:00
|
|
|
command: bash -x Resources/scripts/updater.sh
|
2018-09-08 11:43:07 -04:00
|
|
|
|
|
|
|
workflows:
|
|
|
|
version: 2
|
2020-05-03 17:16:02 +02:00
|
|
|
test-and-deploy:
|
2018-09-08 11:43:07 -04:00
|
|
|
jobs:
|
2020-05-02 20:03:25 +02:00
|
|
|
- test
|
2023-02-06 12:15:23 +01:00
|
|
|
- build
|
2020-05-03 17:16:02 +02:00
|
|
|
- deploy:
|
2020-05-02 20:03:25 +02:00
|
|
|
requires:
|
|
|
|
- test
|
2023-02-06 12:15:23 +01:00
|
|
|
- build
|
2020-05-03 00:16:51 +02:00
|
|
|
filters:
|
|
|
|
branches:
|
2021-12-27 15:11:54 +01:00
|
|
|
only:
|
2020-05-03 17:16:02 +02:00
|
|
|
- master
|
2020-05-13 16:01:54 +02:00
|
|
|
- staging
|
2020-10-04 16:14:34 +02:00
|
|
|
weekly:
|
|
|
|
jobs:
|
|
|
|
- test
|
2023-02-06 12:15:23 +01:00
|
|
|
- build
|
2020-10-04 16:14:34 +02:00
|
|
|
- deploy:
|
|
|
|
requires:
|
|
|
|
- test
|
|
|
|
triggers:
|
|
|
|
- schedule:
|
|
|
|
cron: "0 0 * * 1"
|
|
|
|
filters:
|
|
|
|
branches:
|
|
|
|
only:
|
|
|
|
- staging
|