]>
Commit | Line | Data |
---|---|---|
1 | --- | |
2 | sudo: false | |
3 | language: nix | |
4 | nix: 2.3.4 | |
5 | env: | |
6 | - CUSTOM_NIX_PATH=nixpkgs=channel:nixos-20.03 | |
7 | ||
8 | # Travis nix integration will install nix AFTER the environment variables are set | |
9 | # and the nix installer will overide NIX_PATH variable thus we need to re-export it | |
10 | before_install: | |
11 | - export NIX_PATH="$CUSTOM_NIX_PATH" | |
12 | ||
13 | install: | |
14 | - nix-env -i -f ./default.nix | |
15 | ||
16 | # Check ansible version | |
17 | - ansible --version | |
18 | ||
19 | # Alias role name to mimic actual Galaxy deployment | |
20 | - ln -s ansible-clever ../clever | |
21 | ||
22 | # Create ansible.cfg with correct roles_path | |
23 | - printf '[defaults]\nroles_path=../' >ansible.cfg | |
24 | ||
25 | script: | |
26 | # Basic role syntax check & linting | |
27 | - ansible-lint . | |
28 | - shellcheck **/*.sh | |
29 | - scripts/dhall_check.sh | |
30 | # Run integration test | |
31 | - mkdir -p ~/.local/bin | |
32 | - cp tests/fake.sh ~/.local/bin/clever | |
33 | - cp tests/fake.sh ~/.local/bin/git | |
34 | - ansible-playbook -i tests/inventory tests/test-all.yml | |
35 | ||
36 | notifications: | |
37 | slack: fretlink:pTIylIN7zkwRFuL3aHERmsbB | |
38 | webhooks: https://galaxy.ansible.com/api/v1/notifications/ |