Skip to content

Commit

Permalink
Move over most of CI to GitHub CI (#695)
Browse files Browse the repository at this point in the history
* Move over most of CI to GitHub CI

* Fix theme compilation

* Use npm
  • Loading branch information
facelessuser authored Oct 16, 2019
1 parent 0948eab commit 8004abb
Show file tree
Hide file tree
Showing 17 changed files with 12,534 additions and 7,003 deletions.
96 changes: 96 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
name: build

on:
push:
branches:
- 'master'
pull_request:

jobs:
tests:
strategy:
fail-fast: false
max-parallel: 4
matrix:
platform: [ubuntu-latest, windows-latest]
python-version: [2.7, 3.5, 3.6, 3.7]

runs-on: ${{ matrix.platform }}

steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools tox coverage codecov
python -m pip install -r requirements/test.txt
python -m pip install -r requirements/extra.txt
python -m pip install -r requirements/project.txt
- name: Test with pytest
run: |
python -m pytest --cov pymdownx --cov-append tests
python -m coverage html -d coverage
python -m coverage report --show-missing
- name: Coverage Report
if: success()
run: |
python -m codecov -t ${{ secrets.CODECOV_TOKEN }}
lint:
strategy:
max-parallel: 4
matrix:
python-version: [3.7]

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools
python -m pip install -r requirements/lint.txt
- name: Lint
run: |
python -m flake8 .
documents:
strategy:
max-parallel: 4
matrix:
python-version: [3.7]

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: '10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools
python -m pip install -r requirements/docs.txt
python -m pip install -r requirements/extra.txt
python -m pip install -r requirements/project.txt
npm install
- name: Install Aspell
run: |
sudo apt-get install aspell aspell-en
- name: Build documents
run: |
npm run-script build
python -m mkdocs build --clean --verbose --strict
python -m pyspelling
83 changes: 83 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: deploy

on:
push:
tags:
- '*'

jobs:

documents:
strategy:
max-parallel: 4
matrix:
python-version: [3.7]

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@master
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools
python -m pip install -r requirements/docs.txt
- name: Deploy documents
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
GH_USER: ${{ secrets.GH_USER }}
GH_EMAIL: ${{ secrets.GH_EMAIL }}
run: |
git config user.name ${GH_USER}
git config user.email "${GH_EMAIL}"
git remote add gh-token "https://${GH_TOKEN}@github.com/facelessuser/pymdown-extensions.git"
git fetch gh-token && git fetch gh-token gh-pages:gh-pages
python -m mkdocs gh-deploy -v --clean --remote-name gh-token
git push gh-token gh-pages
wheel:
strategy:
matrix:
python-version: [3.7]

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@master
- uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Package
run: |
pip install --upgrade setuptools wheel
python setup.py bdist_wheel
- name: Publish
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}

sdist:
strategy:
matrix:
python-version: [3.7]

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@master
- uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Package
run: |
pip install --upgrade setuptools
python setup.py sdist
- name: Publish
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
29 changes: 29 additions & 0 deletions .github/workflows/labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: labels

on:
push:
branches:
- 'master'

jobs:
label-sync:
strategy:
max-parallel: 4
matrix:
python-version: [3.7]

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@master
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools
python -m pip install -r requirements/tools.txt
- name: Sync labels
run: |
python tools/gh_labels.py -i tools/labels.json -t ${{ secrets.GH_TOKEN }} -d
56 changes: 4 additions & 52 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
sudo: false

language: python
dist: xenial
sudo: true

# Limit git depth to speed up build
git:
Expand All @@ -14,63 +14,15 @@ cache:

matrix:
include:
- python: 2.7
env: TOXENV=py27
- python: 3.5
env: TOXENV=py35
- python: 3.6
env: TOXENV=py36
- python: 3.7
dist: xenial
env: TOXENV=py37
sudo: true
- python: 3.6
env: TOXENV=lint
- python: 3.6
env: TOXENV=documents

addons:
apt:
packages:
- aspell
- aspell-en

before_install:
- if [ $TOXENV = documents ]; then nvm install 8.15.1; fi
- if [ $TOXENV = documents ]; then nvm alias default 8.15.1; fi
- if [ $TOXENV = documents ]; then npm install -g [email protected]; fi
- python: 3.8-dev
env: TOXENV=py38

install:
- if [ $TOXENV = documents ]; then yarn install; fi
- pip install tox
- pip install codecov
- node --version

script:
- tox

after_success:
- codecov

deploy:
- provider: pypi
user: facelessuser
server: https://upload.pypi.org/legacy/
password:
secure: S/7VvUM4b8dViV5YtOJOE3+w8u/n0nV3b3nyYzcgdetxYp9ppUq7wRZEwWRXGkLH7LPHxprq8n7EGHBVpfDHbesUqj+m93OPVNBlNy8Uh3p6bUlaI0f8MW2zAPq04oOHZ0mbWuDe34aHW3IEoCFCFL5gUAgx7cBIjcHPFFyTPsHnQGAVf/cLHfEE+OtJgUeFLgdBKehbcN9P7W96o8TMrJL6bQObytzzLUFN0LfkqBmqnZH+7g1Hlxw3k9ajSC2edLjCDmuEQy+NYsVrW6/XB9vzNzYA1/JREdP+6IEQ+V4temRzgVWNgWjrl83Du+c73Cc/DkVPoOw/udAHqFk/nNYQCZJbzZnuQxqrp/MDKZxmJzmspDX7PCQV3Mw0pxYTbE/3bWSVVPfwi2VCbaOkELndHBOCBXK0U12exlg9vidJA+18M5TkiNIBCjkWAI9uUeLxfQcW9q7hWeiKgbD2VJPpp4V4TjtTAAMEIyq2Eie2uoreKL07Q82QcKKqudKZWaUl++nh/ZNo5u8X0K2YZQWOD9iKrsCOgpov8Bh9Kz57QpBTDgx6l1NTovmbQ4v1vFgGZVx4MnhpQgIqzHU+5Bb8E/ar0FtsCEfG0m5yLwKA0SOrX8vSAlTu8w3yN+Q/pbbetVsvMR3pCeh8bu+s742wS6Llx5RxALi8nJygm6k=
distributions: "sdist bdist_wheel"
skip_upload_docs: true
on:
tags: true
repo: facelessuser/pymdown-extensions
condition: "$TOXENV = documents"
- provider: pages
github_token: $GITHUB_TOKEN
name: $GITHUB_USER
email: $GITHUB_EMAIL
skip_cleanup: true
local_dir: site
on:
tags: true
repo: facelessuser/pymdown-extensions
condition: "$TOXENV = documents"
39 changes: 0 additions & 39 deletions appveyor.yml

This file was deleted.

1 change: 0 additions & 1 deletion docs/theme/extra-0b9b22dd13.js

This file was deleted.

1 change: 1 addition & 0 deletions docs/theme/extra-0d9305e748.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions gulpfile.babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ const config = {
compress: {
enabled: args.compress,
jsOptions: {
warnings: false,
conditionals: true,
unused: true,
comparisons: true,
Expand Down Expand Up @@ -165,7 +164,7 @@ gulp.task("js:build:rollup", () => {
],
"input": `${config.folders.src}/js/extra.js`
}))
.pipe(gulpif(config.compress.enabled, uglify({compress: config.compress.jsOptions})))
.pipe(gulpif(config.compress.enabled, uglify({compress: config.compress.jsOptions, warnings: false})))
.pipe(gulpif(config.sourcemaps, sourcemaps.write(config.folders.theme)))

// Revisioning
Expand Down
2 changes: 1 addition & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,4 +134,4 @@ extra:
extra_css:
- extra-30d8e6755c.css
extra_javascript:
- extra-0b9b22dd13.js
- extra-0d9305e748.js
Loading

0 comments on commit 8004abb

Please sign in to comment.