This repository has been archived by the owner on Dec 7, 2023. It is now read-only.
build(deps): bump postcss and react-scripts in /demo/www #430
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test and Deploy | |
on: | |
push: | |
paths-ignore: | |
- 'README.md' | |
jobs: | |
test: | |
if: contains(github.event.head_commit.message, '[skip ci]') == false | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
python-version: [3.7, 3.8, 3.9] | |
os: [macos-latest, windows-latest, 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 latest stable | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
override: true | |
components: rustfmt, clippy | |
- name: Lint with RustFmt | |
uses: actions-rs/cargo@v1 | |
with: | |
command: fmt | |
- name: Lint with Clippy | |
uses: actions-rs/cargo@v1 | |
with: | |
command: clippy | |
args: --all-targets --all-features | |
- name: Test with cargo | |
uses: actions-rs/[email protected] | |
with: | |
command: test | |
toolchain: stable | |
- name: Install dependencies with pip | |
working-directory: python | |
run: | | |
python -m pip install --upgrade pip | |
pip install poetry maturin | |
poetry install | |
- name: Build python package | |
working-directory: python | |
run: poetry run maturin develop | |
- name: Test with pytest | |
working-directory: python | |
run: poetry run pytest | |
publish-rust: | |
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/rust/') | |
needs: test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
override: true | |
- name: Publish to creates.io | |
run: | | |
cargo login ${{ secrets.CRATES_PASS }} | |
cargo publish | |
publish-python-wheels: | |
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/python/') | |
needs: test | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
python-version: [3.7, 3.8, 3.9] | |
# ubuntu wheel is built in `manylinux_build.yml` | |
os: [macos-latest, windows-latest] | |
steps: | |
- uses: actions/checkout@v1 | |
- uses: actions/setup-python@v1 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
override: true | |
- name: Install publishment tool | |
working-directory: python | |
run: | | |
python -m pip install --upgrade pip | |
pip install maturin twine | |
- name: Build | |
working-directory: python | |
run: maturin build --no-sdist --release --strip -i python | |
- name: Publish test pypi | |
working-directory: python | |
run: twine upload target/wheels/*whl --repository-url https://test.pypi.org/legacy/ -u ${{ secrets.TEST_PYPI_USER }} -p ${{ secrets.TEST_PYPI_PASS }} | |
- name: Publish pypi | |
working-directory: python | |
run: twine upload target/wheels/*whl -u ${{ secrets.PYPI_USER }} -p ${{ secrets.PYPI_PASS }} | |
publish-python-sdist: | |
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/python/') | |
needs: test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- uses: actions/setup-python@v1 | |
with: | |
python-version: 3.7 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
override: true | |
- name: Install publishment tool | |
working-directory: python | |
run: | | |
python -m pip install --upgrade pip | |
pip install maturin twine | |
- name: Build sdist | |
working-directory: python | |
run: maturin sdist | |
- name: Publish test pypi | |
working-directory: python | |
run: | | |
twine upload target/wheels/*.tar.gz --repository-url https://test.pypi.org/legacy/ -u ${{ secrets.TEST_PYPI_USER }} -p ${{ secrets.TEST_PYPI_PASS }} | |
- name: Publish pypi | |
working-directory: python | |
run: | | |
twine upload target/wheels/*.tar.gz -u ${{ secrets.PYPI_USER }} -p ${{ secrets.PYPI_PASS }} | |