Feat nginx default tls #84
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
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
test: | |
name: test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Setup Grafana Tanka and Jsonnet-Bundler | |
run: | | |
sudo curl -Lo /usr/local/bin/tk https://github.com/grafana/tanka/releases/latest/download/tk-linux-amd64 | |
sudo chmod a+x /usr/local/bin/tk | |
sudo curl -Lo /usr/local/bin/jb https://github.com/jsonnet-bundler/jsonnet-bundler/releases/latest/download/jb-linux-amd64 | |
sudo chmod a+x /usr/local/bin/jb | |
- name: Install dependencies | |
run: | | |
cd tests | |
jb install | |
- name: Run tests | |
run: | | |
export FAILED=0 | |
cd tests | |
for f in environments/*/main.jsonnet; do | |
echo "$f" | |
if tk show "$f" --dangerous-allow-redirect > /dev/null; then | |
echo "OK" | |
else | |
echo "ERR" | |
export FAILED=1 | |
fi | |
done | |
if [ "$FAILED" != "0" ]; then | |
echo "FAIL" | |
exit 1 | |
else | |
echo "SUCCESS" | |
exit 0 | |
fi | |
fmt: | |
name: fmt | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Setup Grafana Tanka | |
run: | | |
sudo curl -Lo /usr/local/bin/tk https://github.com/grafana/tanka/releases/latest/download/tk-linux-amd64 | |
sudo chmod a+x /usr/local/bin/tk | |
- name: Test fmt | |
run: | | |
if $(tk fmt . 2>&1 | grep -q 'No changes'); then | |
echo "SUCCESS" | |
exit 0 | |
else | |
echo "Formating needed. Please run 'tk fmt .'" | |
git diff | |
exit 1 | |
fi |