Skip to content

Commit

Permalink
Fixed workfows
Browse files Browse the repository at this point in the history
  • Loading branch information
guillemcordoba committed Aug 8, 2024
1 parent eec748a commit d7499d3
Show file tree
Hide file tree
Showing 7 changed files with 48 additions and 45 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/test-app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,20 @@ jobs:
- uses: actions/checkout@v3

- name: Install nix
uses: cachix/install-nix-action@v25
uses: cachix/install-nix-action@v27
with:
nix_path: nixpkgs=channel:nixos-unstable
github_access_token: ${{ secrets.GITHUB_TOKEN }}
nix_path: nixpkgs=channel:nixos-24.05

- uses: cachix/cachix-action@v14
- uses: cachix/cachix-action@v15
with:
name: holochain-ci

- uses: cachix/cachix-action@v14
- uses: cachix/cachix-action@v15
with:
name: holochain-open-dev

- name: Test app template
run: |
nix develop --accept-flake-config --command bash -c "sh run_test_app.sh"
nix develop --no-update-lock-file --accept-flake-config --command bash -c "sh run_test_app.sh"
11 changes: 6 additions & 5 deletions .github/workflows/test-zome.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,20 @@ jobs:
- uses: actions/checkout@v3

- name: Install nix
uses: cachix/install-nix-action@v25
uses: cachix/install-nix-action@v27
with:
nix_path: nixpkgs=channel:nixos-unstable
github_access_token: ${{ secrets.GITHUB_TOKEN }}
nix_path: nixpkgs=channel:nixos-24.05

- uses: cachix/cachix-action@v14
- uses: cachix/cachix-action@v15
with:
name: holochain-ci

- uses: cachix/cachix-action@v14
- uses: cachix/cachix-action@v15
with:
name: holochain-open-dev

- name: Test zome template
run: |
nix develop --accept-flake-config --command bash -c "sh run_test_zome.sh"
nix develop --no-update-lock-file --accept-flake-config --command bash -c "sh run_test_zome.sh"
11 changes: 6 additions & 5 deletions templates/app/web-app/.github/workflows/test.yaml.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,19 @@ jobs:
- uses: actions/checkout@v2

- name: Install nix
uses: cachix/install-nix-action@v25
uses: cachix/install-nix-action@v27
with:
nix_path: nixpkgs=channel:nixos-unstable
github_access_token: ${{ secrets.GITHUB_TOKEN }}
nix_path: nixpkgs=channel:nixos-24.05

- uses: cachix/cachix-action@v14
- uses: cachix/cachix-action@v15
with:
name: holochain-ci

- uses: cachix/cachix-action@v14
- uses: cachix/cachix-action@v15
with:
name: holochain-open-dev

- name: Install and test
run: |
nix develop --accept-flake-config --command bash -c "pnpm i && pnpm t && pnpm package"
nix develop --no-update-lock-file --accept-flake-config --command bash -c "pnpm i && pnpm t && pnpm package"
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Install nix
uses: cachix/install-nix-action@v25
uses: cachix/install-nix-action@v27
with:
nix_path: nixpkgs=channel:nixos-unstable
github_access_token: ${{ secrets.GITHUB_TOKEN }}
nix_path: nixpkgs=channel:nixos-24.05

- uses: cachix/cachix-action@v14
- uses: cachix/cachix-action@v15
with:
name: holochain-ci

- uses: cachix/cachix-action@v14
- uses: cachix/cachix-action@v15
with:
name: holochain-open-dev

Expand All @@ -37,22 +37,22 @@ jobs:
CACHIX_AUTH_TOKEN: "$\{{ secrets.CACHIX_TOKEN_HOLOCHAIN_OPEN_DEV }}"
run: |
cachix watch-exec holochain-open-dev -- nix build --no-update-lock-file --accept-flake-config -L .#{{snake_case app_name}}_integrity
cachix push holochain-open-dev $(nix path-info --json --accept-flake-config --no-warn-dirty .#{{snake_case app_name}}_integrity | nix run nixpkgs#jq -- -r '.[].path')
cachix pin holochain-open-dev {{snake_case app_name}}_integrity_debug $(nix path-info --json --accept-flake-config --no-warn-dirty .#{{snake_case app_name}}_integrity | nix run nixpkgs#jq -- -r '.[].path')
cachix push holochain-open-dev $(nix path-info --json --accept-flake-config --no-warn-dirty .#{{snake_case app_name}}_integrity | nix run nixpkgs#jq -- -r 'keys[0]')
cachix pin holochain-open-dev {{snake_case app_name}}_integrity_debug $(nix path-info --json --accept-flake-config --no-warn-dirty .#{{snake_case app_name}}_integrity | nix run nixpkgs#jq -- -r 'keys[0]')

cachix watch-exec holochain-open-dev -- nix build --no-update-lock-file --accept-flake-config -L .#{{snake_case app_name}}
cachix push holochain-open-dev $(nix path-info --json --accept-flake-config --no-warn-dirty .#{{snake_case app_name}} | nix run nixpkgs#jq -- -r '.[].path')
cachix pin holochain-open-dev {{snake_case app_name}}_debug $(nix path-info --json --accept-flake-config --no-warn-dirty .#{{snake_case app_name}} | nix run nixpkgs#jq -- -r '.[].path')
cachix push holochain-open-dev $(nix path-info --json --accept-flake-config --no-warn-dirty .#{{snake_case app_name}} | nix run nixpkgs#jq -- -r 'keys[0]')
cachix pin holochain-open-dev {{snake_case app_name}}_debug $(nix path-info --json --accept-flake-config --no-warn-dirty .#{{snake_case app_name}} | nix run nixpkgs#jq -- -r 'keys[0]')

- name: Build release zomes
if: matrix.os == 'ubuntu-latest'
env:
CACHIX_AUTH_TOKEN: "$\{{ secrets.CACHIX_TOKEN_HOLOCHAIN_OPEN_DEV }}"
run: |
cachix watch-exec holochain-open-dev -- nix build --no-update-lock-file --accept-flake-config -L .#{{snake_case app_name}}_integrity.meta.release
cachix push holochain-open-dev $(nix path-info --json --accept-flake-config --no-warn-dirty .#{{snake_case app_name}}_integrity.meta.release | nix run nixpkgs#jq -- -r '.[].path')
cachix pin holochain-open-dev {{snake_case app_name}}_integrity $(nix path-info --json --accept-flake-config --no-warn-dirty .#{{snake_case app_name}}_integrity.meta.release | nix run nixpkgs#jq -- -r '.[].path')
cachix push holochain-open-dev $(nix path-info --json --accept-flake-config --no-warn-dirty .#{{snake_case app_name}}_integrity.meta.release | nix run nixpkgs#jq -- -r 'keys[0]')
cachix pin holochain-open-dev {{snake_case app_name}}_integrity $(nix path-info --json --accept-flake-config --no-warn-dirty .#{{snake_case app_name}}_integrity.meta.release | nix run nixpkgs#jq -- -r 'keys[0]')

cachix watch-exec holochain-open-dev -- nix build --no-update-lock-file --accept-flake-config -L .#{{snake_case app_name}}.meta.release
cachix push holochain-open-dev $(nix path-info --json --accept-flake-config --no-warn-dirty .#{{snake_case app_name}}.meta.release | nix run nixpkgs#jq -- -r '.[].path')
cachix pin holochain-open-dev {{snake_case app_name}} $(nix path-info --json --accept-flake-config --no-warn-dirty .#{{snake_case app_name}}.meta.release | nix run nixpkgs#jq -- -r '.[].path')
cachix push holochain-open-dev $(nix path-info --json --accept-flake-config --no-warn-dirty .#{{snake_case app_name}}.meta.release | nix run nixpkgs#jq -- -r 'keys[0]')
cachix pin holochain-open-dev {{snake_case app_name}} $(nix path-info --json --accept-flake-config --no-warn-dirty .#{{snake_case app_name}}.meta.release | nix run nixpkgs#jq -- -r 'keys[0]')
12 changes: 6 additions & 6 deletions templates/zome/web-app/.github/workflows/publish-docs.yml.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,22 @@ jobs:
- name: Checkout 🛎️
uses: actions/checkout@v3

- name: Install nix
uses: cachix/install-nix-action@v25
uses: cachix/install-nix-action@v27
with:
nix_path: nixpkgs=channel:nixos-unstable
github_access_token: ${{ secrets.GITHUB_TOKEN }}
nix_path: nixpkgs=channel:nixos-24.05

- uses: cachix/cachix-action@v14
- uses: cachix/cachix-action@v15
with:
name: holochain-ci

- uses: cachix/cachix-action@v14
- uses: cachix/cachix-action@v15
with:
name: holochain-open-dev

- name: Install and Build 🔧
run: |
nix develop --accept-flake-config --command bash -c "pnpm i && pnpm -F docs build"
nix develop --no-update-lock-file --accept-flake-config --command bash -c "pnpm i && pnpm -F docs build"

- name: Deploy 🚀
uses: JamesIves/[email protected]
Expand Down
12 changes: 6 additions & 6 deletions templates/zome/web-app/.github/workflows/test.yaml.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,19 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Install nix
uses: cachix/install-nix-action@v25
uses: cachix/install-nix-action@v27
with:
nix_path: nixpkgs=channel:nixos-unstable
github_access_token: ${{ secrets.GITHUB_TOKEN }}
nix_path: nixpkgs=channel:nixos-24.05

- uses: cachix/cachix-action@v14
- uses: cachix/cachix-action@v15
with:
name: holochain-ci

- uses: cachix/cachix-action@v14
- uses: cachix/cachix-action@v15
with:
name: holochain-open-dev

- name: Install and test
run: |
nix develop --accept-flake-config --command bash -c "pnpm i && pnpm t && pnpm -F @holochain-open-dev/{{kebab_case app_name}} build"
nix develop --no-update-lock-file --accept-flake-config --command bash -c "pnpm i && pnpm t && pnpm -F @holochain-open-dev/{{kebab_case app_name}} build"
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Install nix
uses: cachix/install-nix-action@v25
uses: cachix/install-nix-action@v27
with:
nix_path: nixpkgs=channel:nixos-unstable
github_access_token: ${{ secrets.GITHUB_TOKEN }}
nix_path: nixpkgs=channel:nixos-24.05

- uses: cachix/cachix-action@v14
- uses: cachix/cachix-action@v15
with:
name: holochain-ci

- uses: cachix/cachix-action@v14
- uses: cachix/cachix-action@v15
with:
name: holochain-open-dev

Expand Down

0 comments on commit d7499d3

Please sign in to comment.