pokeapi/.circleci/config.yml

89 lines
2 KiB
YAML
Raw Normal View History

version: 2.1
jobs:
2020-05-01 11:30:53 +00:00
test:
docker:
2023-01-08 18:10:15 +00:00
- image: cimg/python:3.10.9
steps:
- checkout
2020-07-10 13:06:13 +00:00
- run:
name: Pull Submodules
command: |
git submodule init
git submodule update --remote
- run:
2020-04-24 19:31:39 +00:00
name: Install deps
2021-12-27 14:15:41 +00:00
command: make dev-install
- run:
2020-04-24 19:31:39 +00:00
name: Linting
command: make format-check
- run:
2020-04-24 19:31:39 +00:00
name: Run tests
command: make test
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
deploy:
machine:
2023-12-13 01:36:44 +00:00
image: ubuntu-2204:2023.10.1
2023-01-08 18:12:39 +00:00
resource_class: large
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:
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
workflows:
version: 2
test-and-deploy:
jobs:
- test
- build
- deploy:
requires:
- test
- build
filters:
branches:
only:
- master
2020-05-13 14:01:54 +00:00
- staging
2020-10-04 14:14:34 +00:00
weekly:
jobs:
- test
- build
2020-10-04 14:14:34 +00:00
- deploy:
requires:
- test
triggers:
- schedule:
cron: "0 0 * * 1"
filters:
branches:
only:
- staging