Skip to content

Commit 46b316d

Browse files
authored
ci: refactor github workflows for readability (grafana#192)
* 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
1 parent 439f4de commit 46b316d

File tree

4 files changed

+51
-57
lines changed

4 files changed

+51
-57
lines changed

.github/workflows/ci.yaml

-38
This file was deleted.

.github/workflows/main.yml

-19
This file was deleted.

.github/workflows/publish-docs.yaml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Publish docs via GitHub Pages
2+
on:
3+
push:
4+
branches:
5+
- main
6+
7+
jobs:
8+
publish-docs:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v4
13+
with:
14+
fetch-depth: 0
15+
16+
- uses: actions/setup-python@v5
17+
18+
- name: Install dependencies
19+
run: pip install -r .mkdocs/requirements.txt
20+
21+
- run: git config user.name 'github-actions[bot]' && git config user.email 'github-actions[bot]@users.noreply.github.com'
22+
23+
- name: Publish docs
24+
run: mkdocs gh-deploy --force -f .mkdocs/mkdocs.yml

.github/workflows/tests.yaml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Tests
2+
on:
3+
pull_request:
4+
5+
env:
6+
JSONNET_VERSION: "0.20.0"
7+
JSONNET_BUNDLER_VERSION: "0.5.1"
8+
9+
jobs:
10+
tests:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Install jsonnet
17+
run: |
18+
wget -qO- https://github.com/google/go-jsonnet/releases/download/v${JSONNET_VERSION}/go-jsonnet_${JSONNET_VERSION}_Linux_x86_64.tar.gz \
19+
| tar -xvz --one-top-level=$HOME/.local/bin
20+
21+
- name: Install jsonnet-bundler
22+
run: |
23+
wget -qO "$HOME/.local/bin/jb" https://github.com/jsonnet-bundler/jsonnet-bundler/releases/download/v${JSONNET_BUNDLER_VERSION}/jb-linux-amd64
24+
chmod u+x "$HOME/.local/bin/jb"
25+
26+
- name: Run tests
27+
run: make test

0 commit comments

Comments
 (0)