mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Compare commits
3 commits
main
...
windows-ci
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
47b5ab43be |
||
|
|
2b2929f731 |
||
|
|
3ab8a7cd27 |
1 changed files with 23 additions and 51 deletions
76
.travis.yml
76
.travis.yml
|
|
@ -1,55 +1,27 @@
|
||||||
|
cache: pip
|
||||||
|
|
||||||
language: python
|
language: python
|
||||||
dist: xenial
|
|
||||||
|
|
||||||
# 3.6 is listed first so it gets used for the later build stages
|
matrix:
|
||||||
python:
|
|
||||||
- "3.6"
|
|
||||||
- "3.7"
|
|
||||||
- "3.5"
|
|
||||||
|
|
||||||
# Executed for 3.5 AND 3.5 as the first "test" stage:
|
|
||||||
script:
|
|
||||||
- pip install -U pip wheel
|
|
||||||
- pip install .[test]
|
|
||||||
- pytest
|
|
||||||
|
|
||||||
cache:
|
|
||||||
directories:
|
|
||||||
- $HOME/.cache/pip
|
|
||||||
|
|
||||||
# This defines further stages that execute after the tests
|
|
||||||
jobs:
|
|
||||||
include:
|
include:
|
||||||
- stage: deploy latest.datasette.io
|
- os: windows
|
||||||
if: branch = master AND type = push
|
language: bash
|
||||||
script:
|
name: Windows
|
||||||
- pip install .[test]
|
- os: linux
|
||||||
- npm install -g now
|
python: "3.5"
|
||||||
- python tests/fixtures.py fixtures.db fixtures.json
|
- os: linux
|
||||||
- export ALIAS=`echo $TRAVIS_COMMIT | cut -c 1-7`
|
python: "3.6"
|
||||||
- datasette publish nowv1 fixtures.db -m fixtures.json --token=$NOW_TOKEN --branch=$TRAVIS_COMMIT --version-note=$TRAVIS_COMMIT --name=datasette-latest-$ALIAS --alias=latest.datasette.io --alias=$ALIAS.datasette.io
|
- os: linux
|
||||||
- stage: release tagged version
|
python: "3.7-dev"
|
||||||
if: tag IS present
|
|
||||||
python: 3.6
|
install:
|
||||||
deploy:
|
- if [ "$TRAVIS_OS_NAME" = "windows" ]; then
|
||||||
- provider: pypi
|
choco install python3;
|
||||||
user: simonw
|
export PATH=/c/Python37:/c/Python37/Scripts:/c/Python38:/c/Python38/Scripts:$PATH;
|
||||||
distributions: bdist_wheel
|
python -m pip install -e .[test];
|
||||||
password: ${PYPI_PASSWORD}
|
else
|
||||||
on:
|
pip install -e .[test];
|
||||||
branch: master
|
fi;
|
||||||
tags: true
|
|
||||||
- stage: publish docker image
|
script:
|
||||||
if: tag IS present
|
- pytest
|
||||||
python: 3.6
|
|
||||||
script:
|
|
||||||
- npm install -g now
|
|
||||||
- export ALIAS=`echo $TRAVIS_COMMIT | cut -c 1-7`
|
|
||||||
- export TAG=`echo $TRAVIS_TAG | sed 's/\./-/g' | sed 's/.*/v&/'`
|
|
||||||
- now alias $ALIAS.datasette.io $TAG.datasette.io --token=$NOW_TOKEN
|
|
||||||
# Build and release to Docker Hub
|
|
||||||
- docker login -u $DOCKER_USER -p $DOCKER_PASS
|
|
||||||
- export REPO=datasetteproject/datasette
|
|
||||||
- docker build -f Dockerfile -t $REPO:$TRAVIS_TAG .
|
|
||||||
- docker tag $REPO:$TRAVIS_TAG $REPO:latest
|
|
||||||
- docker push $REPO
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue