-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (65 loc) · 2.04 KB
/
bootstrap_test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
---
name: bootstrap test
on:
workflow_call: {}
jobs:
test:
name: test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
- name: Cache
uses: actions/[email protected]
with:
path: |
$HOME/.cache/dhall/
key: ${{ runner.os }}-${{ hashFiles('./.github/workflows/turma-bootstrap-test.dhall') }}
- uses: erlef/[email protected]
with:
otp-version: "24.3"
elixir-version: "1.13.4"
- name: setup
run: |
mix local.hex --if-missing --force
mix local.rebar --if-missing --force
mix deps.get
- name: release
run: make all
env:
MIX_ENV: prod
- name: Setup Dhall
uses: dhall-lang/setup-dhall@v4
with:
version: "1.41.1"
- name: Kubectl tool installer
uses: Azure/setup-kubectl@v3
- uses: okteto/[email protected]
with:
token: ${{ secrets.OKTETO_TOKEN }}
- name: set namespace
id: namespace
run: |
NS="${{ (github.event_name == 'pull_request' && github.event.pull_request.head.ref) || github.ref_name }}-turma-thalesmg"
NS=$(echo $NS | tr A-Z a-z | tr -cd \\-a-z)
echo ::set-output name=name::"$NS"
- name: Create Namespace
uses: okteto/[email protected]
with:
namespace: ${{ steps.namespace.outputs.name }}
- name: setup test environment
env:
NAMESPACE: ${{ steps.namespace.outputs.name }}
KUBECONFIG: ${{ steps.kubeconfig.outputs.kubeconfig }}
OKTETO_TOKEN: ${{ secrets.OKTETO_TOKEN }}
run: ./.github/workflows/bootstrap_test.sh
- name: finally test bootstrapping
run: ./.github/workflows/bootstrap_test.exs
env:
NAMESPACE: ${{ steps.namespace.outputs.name }}
- name: Delete Namespace
# if: ${{ always() }}
uses: okteto/[email protected]
with:
namespace: ${{ steps.namespace.outputs.name }}
...