Merge pull request #11 from Omochice/renovate/actions-setup-python-5.x #12
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: vim-themis | |
on: | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- "README.md" | |
- "doc/*.txt" | |
jobs: | |
themis: | |
strategy: | |
fail-fast: false | |
matrix: | |
neovim: [false, true] | |
version: ["nightly", "stable"] | |
runs-on: ubuntu-latest | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
- name: checkout vim-themis | |
uses: actions/checkout@v4 | |
with: | |
repository: thinca/vim-themis | |
path: vim-themis | |
- name: setup vim | |
id: vim | |
uses: rhysd/action-setup-vim@v1 | |
with: | |
neovim: ${{ matrix.neovim }} | |
version: ${{ matrix.version }} | |
- name: Run test with vim-themis | |
env: | |
THEMIS_VIM: ${{ steps.vim.outputs.executable }} | |
THEMIS_PROFILE: ${{ github.workspace }}/vim-profile-${{ runner.os }}-${{ matrix.neovim }}-${{ matrix.version }}.txt | |
run: | | |
${GITHUB_WORKSPACE}/vim-themis/bin/themis --reporter dot | |
- name: setup python | |
uses: actions/setup-python@v5.0.0 | |
with: | |
python-version: '3.10' | |
- name: collect coverage | |
env: | |
THEMIS_PROFILE: ${{ github.workspace }}/vim-profile-${{ runner.os }}-${{ matrix.neovim }}-${{ matrix.version }}.txt | |
run: | | |
pip install covimerage | |
covimerage write_coverage "${THEMIS_PROFILE}" | |
covimerage xml | |
- name: install octocov | |
uses: jaxxstorm/action-install-gh-release@v1.10.0 | |
with: | |
repo: k1LoW/octocov | |
- name: make covarage badge | |
run: | | |
octocov badge coverage --out ${{ github.workspace }}/badge-${{ runner.os }}-$(test "${{ matrix.neovim }}" = "true" && echo "neovim" || echo "vim" )-${{ matrix.version }}.svg | |
- name: upload badge to artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
path: badge*.svg | |
if-no-files-found: error | |
upload-coverage-badge: | |
runs-on: ubuntu-latest | |
needs: themis | |
steps: | |
- name: download artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
name: artifact | |
path: docs | |
- name: upload badge to artifact | |
uses: actions/upload-pages-artifact@v2 | |
with: | |
path: docs | |
deploy-to-github-pages: | |
runs-on: ubuntu-latest | |
needs: upload-coverage-badge | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v2 |