add test action #25
Workflow file for this run
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
name: Run Tests | |
on: | |
pull_request: | |
types: [ opened, reopened, synchronize ] | |
branches: | |
- "**" | |
- "!master" | |
push: | |
branches: | |
- master | |
tags: | |
- "v*.*.*" | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install fuse | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y fuse3 | |
sudo bash -c 'echo "user_allow_other" >> /etc/fuse.conf' | |
- uses: actions/setup-go@v4 | |
with: | |
go-version: '1.20' | |
- uses: cachix/install-nix-action@v22 | |
with: | |
nix_path: nixpkgs=channel:nixos-unstable | |
- name: Flake check | |
run: nix flake check | |
# - name: Run tests | |
# run: | | |
# nix develop --command nix run '.#initKind' | |
# nix develop --command nix run '.#deployToKind' | |
# nix develop --command nix run '.#getKubeconfig' | |
# nix develop --command go test -v ./... | |
- name: Run tests | |
uses: workflow/nix-shell-action@v3 | |
with: | |
flakes-from-devshell: true | |
script: | | |
initKind | |
deployToKind | |
getKubeconfig | |
go test -v ./... | |
- name: Print rclone log | |
if: ${{ failure() }} | |
run: cat /tmp/rclone.log | |