mirror of
https://github.com/RustPython/RustPython.git
synced 2026-06-09 22:49:57 +09:00
62 lines
1.6 KiB
YAML
62 lines
1.6 KiB
YAML
on: [push, pull_request]
|
|
|
|
name: CI
|
|
|
|
jobs:
|
|
rust_tests:
|
|
name: Run tests
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
os: [macos-latest, ubuntu-latest, windows-latest]
|
|
fail-fast: false
|
|
steps:
|
|
- uses: actions/checkout@master
|
|
- name: Convert symlinks to hardlink (windows only)
|
|
run: powershell.exe scripts/symlinks-to-hardlinks.ps1
|
|
if: matrix.os == 'windows-latest'
|
|
- name: build rustpython
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: build
|
|
args: --verbose --all
|
|
- name: run rust tests
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: test
|
|
args: --verbose --all
|
|
- uses: actions/setup-python@v1
|
|
with:
|
|
python-version: 3.6
|
|
- name: Install pipenv
|
|
run: |
|
|
python -V
|
|
python -m pip install --upgrade pip
|
|
python -m pip install pipenv
|
|
- run: pipenv install
|
|
working-directory: ./tests
|
|
- name: run snippets
|
|
run: pipenv run pytest
|
|
working-directory: ./tests
|
|
|
|
format:
|
|
name: Check Rust code with rustfmt and clippy
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@master
|
|
- uses: actions-rs/toolchain@v1
|
|
with:
|
|
profile: minimal
|
|
toolchain: stable
|
|
components: rustfmt
|
|
override: true
|
|
- name: run rustfmt
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: fmt
|
|
args: --all -- --check
|
|
- name: run clippy
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: clippy
|
|
args: --all -- -Dwarnings |