Skip to content

Commit

Permalink
ci: refactor github workflows for readability (#192)
Browse files Browse the repository at this point in the history
* refactor: update github workflows for readability

* refactor: rename of ci.yaml to tests.yaml to align with in-file naming

* refactor: make workflow install commands easier to copy paste locally

* refactor: transition back to env vars in test workflow
  • Loading branch information
consideRatio authored Apr 10, 2024
1 parent 439f4de commit 46b316d
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 57 deletions.
38 changes: 0 additions & 38 deletions .github/workflows/ci.yaml

This file was deleted.

19 changes: 0 additions & 19 deletions .github/workflows/main.yml

This file was deleted.

24 changes: 24 additions & 0 deletions .github/workflows/publish-docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Publish docs via GitHub Pages
on:
push:
branches:
- main

jobs:
publish-docs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-python@v5

- name: Install dependencies
run: pip install -r .mkdocs/requirements.txt

- run: git config user.name 'github-actions[bot]' && git config user.email 'github-actions[bot]@users.noreply.github.com'

- name: Publish docs
run: mkdocs gh-deploy --force -f .mkdocs/mkdocs.yml
27 changes: 27 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Tests
on:
pull_request:

env:
JSONNET_VERSION: "0.20.0"
JSONNET_BUNDLER_VERSION: "0.5.1"

jobs:
tests:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Install jsonnet
run: |
wget -qO- https://github.com/google/go-jsonnet/releases/download/v${JSONNET_VERSION}/go-jsonnet_${JSONNET_VERSION}_Linux_x86_64.tar.gz \
| tar -xvz --one-top-level=$HOME/.local/bin
- name: Install jsonnet-bundler
run: |
wget -qO "$HOME/.local/bin/jb" https://github.com/jsonnet-bundler/jsonnet-bundler/releases/download/v${JSONNET_BUNDLER_VERSION}/jb-linux-amd64
chmod u+x "$HOME/.local/bin/jb"
- name: Run tests
run: make test

0 comments on commit 46b316d

Please sign in to comment.