|
| 1 | +name: CI |
| 2 | +on: |
| 3 | + pull_request: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - dev |
| 7 | + |
| 8 | +jobs: |
| 9 | + test-integration: |
| 10 | + name: Run integration tests |
| 11 | + runs-on: ubuntu-latest |
| 12 | + |
| 13 | + steps: |
| 14 | + - name: Checkout repository |
| 15 | + uses: actions/checkout@v2 |
| 16 | + with: |
| 17 | + ref: ${{ github.event.pull_request.head.sha }} |
| 18 | + fetch-depth: 20 |
| 19 | + |
| 20 | + - name: Install dependencies |
| 21 | + run: | |
| 22 | + apt update |
| 23 | + apt install --yes --no-install-recommends neovim curl git python3-pip python3-pytest mypy flake8 npm make |
| 24 | + apt clean |
| 25 | + rm -rf /var/lib/apt/lists/* |
| 26 | + python3 -m pip install neovim vim-vint |
| 27 | +
|
| 28 | + - name: Install Rust toolchain |
| 29 | + uses: actions-rs/toolchain@v1 |
| 30 | + with: |
| 31 | + toolchain: stable |
| 32 | + profile: minimal |
| 33 | + override: true |
| 34 | + components: rustfmt, clippy |
| 35 | + |
| 36 | + - name: Test |
| 37 | + run: make integration-test |
| 38 | + |
| 39 | + test-unit: |
| 40 | + name: Run unit tests |
| 41 | + runs-on: ${{ matrix.os }} |
| 42 | + strategy: |
| 43 | + fail-fast: false |
| 44 | + matrix: |
| 45 | + os: [ubuntu-latest, windows-latest, macos-latest] |
| 46 | + |
| 47 | + steps: |
| 48 | + - name: Checkout repository |
| 49 | + uses: actions/checkout@v2 |
| 50 | + with: |
| 51 | + ref: ${{ github.event.pull_request.head.sha }} |
| 52 | + fetch-depth: 20 |
| 53 | + |
| 54 | + - name: Install Rust toolchain |
| 55 | + uses: actions-rs/toolchain@v1 |
| 56 | + with: |
| 57 | + toolchain: stable |
| 58 | + profile: minimal |
| 59 | + override: true |
| 60 | + components: rustfmt, clippy |
| 61 | + |
| 62 | + - name: Compile |
| 63 | + run: cargo test --no-run --locked |
| 64 | + |
| 65 | + - name: Test |
| 66 | + run: cargo test |
| 67 | + |
| 68 | + lint-rust: |
| 69 | + name: Lint rust |
| 70 | + runs-on: ubuntu-latest |
| 71 | + |
| 72 | + steps: |
| 73 | + - name: Checkout repository |
| 74 | + uses: actions/checkout@v2 |
| 75 | + with: |
| 76 | + ref: ${{ github.event.pull_request.head.sha }} |
| 77 | + fetch-depth: 20 |
| 78 | + |
| 79 | + - name: Install Rust toolchain |
| 80 | + uses: actions-rs/toolchain@v1 |
| 81 | + with: |
| 82 | + toolchain: stable |
| 83 | + profile: minimal |
| 84 | + override: true |
| 85 | + components: rustfmt, clippy |
| 86 | + |
| 87 | + - name: Format |
| 88 | + run: cargo fmt -- --check |
| 89 | + |
| 90 | + - name: Check |
| 91 | + run: cargo clippy |
| 92 | + |
| 93 | + lint-vimscript: |
| 94 | + name: Lint VimL |
| 95 | + runs-on: ubuntu-lataest |
| 96 | + |
| 97 | + steps: |
| 98 | + - name: Checkout repository |
| 99 | + uses: actions/checkout@v2 |
| 100 | + |
| 101 | + - name: Install dependencies |
| 102 | + run: | |
| 103 | + apt update |
| 104 | + apt install --yes --no-install-recommends neovim curl git python3-pip python3-pytest mypy flake8 npm make |
| 105 | + apt clean |
| 106 | + rm -rf /var/lib/apt/lists/* |
| 107 | + python3 -m pip install neovim vim-vint |
| 108 | +
|
| 109 | + - name: Lint |
| 110 | + run: vim-lint |
| 111 | + |
| 112 | + lint-python: |
| 113 | + name: Lint Python |
| 114 | + runs-on: ubuntu-lataest |
| 115 | + |
| 116 | + steps: |
| 117 | + - name: Checkout repository |
| 118 | + uses: actions/checkout@v2 |
| 119 | + |
| 120 | + - name: Install dependencies |
| 121 | + run: | |
| 122 | + apt update |
| 123 | + apt install --yes --no-install-recommends neovim python3-pip python3-pytest mypy flake8 |
| 124 | + apt clean |
| 125 | + rm -rf /var/lib/apt/lists/* |
| 126 | +
|
| 127 | + - name: Lint |
| 128 | + run: python-lint |
0 commit comments