diff options
| author | William Boman <william@redwill.se> | 2022-07-09 01:00:34 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-07-09 01:00:34 +0200 |
| commit | d132a7a673d43b2da73f75e09fbe7fb49c431514 (patch) | |
| tree | 4b3b10d68ee149382d71b6977664bcb9d6dd2d20 /.github | |
| parent | feat: add black (#34) (diff) | |
| download | mason-d132a7a673d43b2da73f75e09fbe7fb49c431514.tar mason-d132a7a673d43b2da73f75e09fbe7fb49c431514.tar.gz mason-d132a7a673d43b2da73f75e09fbe7fb49c431514.tar.bz2 mason-d132a7a673d43b2da73f75e09fbe7fb49c431514.tar.lz mason-d132a7a673d43b2da73f75e09fbe7fb49c431514.tar.xz mason-d132a7a673d43b2da73f75e09fbe7fb49c431514.tar.zst mason-d132a7a673d43b2da73f75e09fbe7fb49c431514.zip | |
chore(workflow): modularize scripts and remove mason-lspconfig from CI checks (#36)
Diffstat (limited to '.github')
| -rw-r--r-- | .github/workflows/autogenerate.yml (renamed from .github/workflows/run-autogen.yml) | 21 | ||||
| -rw-r--r-- | .github/workflows/check-generated-code-state.yml | 29 | ||||
| -rw-r--r-- | .github/workflows/metadata-diff.yml | 30 | ||||
| -rw-r--r-- | .github/workflows/stylua.yml | 1 |
4 files changed, 38 insertions, 43 deletions
diff --git a/.github/workflows/run-autogen.yml b/.github/workflows/autogenerate.yml index 1a97114f..3c596ca0 100644 --- a/.github/workflows/run-autogen.yml +++ b/.github/workflows/autogenerate.yml @@ -1,9 +1,9 @@ -name: Run autogen script +name: Autogenerate code on: workflow_dispatch: schedule: - - cron: "15 13 * * *" + - cron: "0 10 * * *" jobs: run-autogen-script: @@ -15,13 +15,8 @@ jobs: neovim: true version: v0.7.0 - - name: Clone dependencies - run: | - mkdir -p ~/.local/share/nvim/site/pack/packer/start - git clone --depth 1 https://github.com/neovim/nvim-lspconfig ~/.local/share/nvim/site/pack/packer/start/nvim-lspconfig - - - name: Run autogen_metadata.sh script - run: ./scripts/autogen_metadata.sh + - name: make autogenerate + run: make autogenerate - name: Create Pull Request id: cpr @@ -30,13 +25,13 @@ jobs: token: ${{ secrets.PAT }} author: "William Botman <william+bot@redwill.se>" committer: "William Botman <william+bot@redwill.se>" - add-paths: lua/mason/_generated - commit-message: run autogen_metadata.lua - branch: chore/autogen_metadata + add-paths: lua/mason-lspconfig lua/mason-schemas + commit-message: "chore: update generated code" + branch: chore/autogenerate branch-suffix: short-commit-hash delete-branch: true labels: automerge - title: run autogen_metadata.lua + title: "chore: update generated code" - name: Enable Pull Request Automerge if: steps.cpr.outputs.pull-request-operation == 'created' diff --git a/.github/workflows/check-generated-code-state.yml b/.github/workflows/check-generated-code-state.yml new file mode 100644 index 00000000..e79e14fb --- /dev/null +++ b/.github/workflows/check-generated-code-state.yml @@ -0,0 +1,29 @@ +name: Check generated code state + +on: + push: + branches: + - "alpha" + pull_request: + +jobs: + check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: rhysd/action-setup-vim@v1 + with: + neovim: true + version: v0.7.0 + + - name: make generate + run: make generate + + - name: Ensure there are no diffs + run: | + git update-index -q --refresh + git diff + git diff-index --exit-code --quiet HEAD -- || { + echo '::error::Generated code is not up to date, run "make generate".'; + exit 1; + } diff --git a/.github/workflows/metadata-diff.yml b/.github/workflows/metadata-diff.yml deleted file mode 100644 index ddc129ac..00000000 --- a/.github/workflows/metadata-diff.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: Metadata diff checker - -on: - push: - branches: - - "main" - pull_request: - -jobs: - metadata-diff-check: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: rhysd/action-setup-vim@v1 - with: - neovim: true - version: v0.7.0 - - - name: Clone dependencies - run: | - mkdir -p ~/.local/share/nvim/site/pack/packer/start - git clone --depth 1 https://github.com/neovim/nvim-lspconfig ~/.local/share/nvim/site/pack/packer/start/nvim-lspconfig - - - name: Run autogen_metadata.sh script - run: ./scripts/autogen_metadata.sh - - - name: Ensure there are no diffs - run: | - git update-index --refresh - git diff-index --quiet HEAD -- diff --git a/.github/workflows/stylua.yml b/.github/workflows/stylua.yml index 1532fc6f..877795de 100644 --- a/.github/workflows/stylua.yml +++ b/.github/workflows/stylua.yml @@ -3,6 +3,7 @@ name: Stylua check on: push: branches: + - "alpha" pull_request: jobs: |
