Skip to content

Commit

Permalink
refactor(ci/cd): only run tests on pushes to main and PRs.
Browse files Browse the repository at this point in the history
  • Loading branch information
shahinism committed Jul 22, 2024
1 parent fbb1146 commit 6d36ebe
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 45 deletions.
20 changes: 11 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name: "Test"
on:
pull_request:
push:
branches:
- main

jobs:
tests:
Expand All @@ -12,13 +14,13 @@ jobs:
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v26
- uses: cachix/cachix-action@v14
with:
name: devenv
- name: Install devenv.sh
run: nix profile install nixpkgs#devenv
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v26
- uses: cachix/cachix-action@v14
with:
name: devenv
- name: Install devenv.sh
run: nix profile install nixpkgs#devenv

- name: Build the devenv shell and run any pre-commit hooks
run: devenv test
- name: Build the devenv shell and run any pre-commit hooks
run: devenv test
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name: "Test"
on:
pull_request:
push:
branches:
- main

jobs:
tests:
Expand All @@ -12,13 +14,13 @@ jobs:
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v26
- uses: cachix/cachix-action@v14
with:
name: devenv
- name: Install devenv.sh
run: nix profile install nixpkgs#devenv
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v26
- uses: cachix/cachix-action@v14
with:
name: devenv
- name: Install devenv.sh
run: nix profile install nixpkgs#devenv

- name: Build the devenv shell and run any pre-commit hooks
run: devenv test
- name: Build the devenv shell and run any pre-commit hooks
run: devenv test
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name: "Test"
on:
pull_request:
push:
branches:
- main

jobs:
tests:
Expand All @@ -12,13 +14,13 @@ jobs:
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v26
- uses: cachix/cachix-action@v14
with:
name: devenv
- name: Install devenv.sh
run: nix profile install nixpkgs#devenv
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v26
- uses: cachix/cachix-action@v14
with:
name: devenv
- name: Install devenv.sh
run: nix profile install nixpkgs#devenv

- name: Build the devenv shell and run any pre-commit hooks
run: devenv test
- name: Build the devenv shell and run any pre-commit hooks
run: devenv test
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name: "Test"
on:
pull_request:
push:
branches:
- main

jobs:
tests:
Expand All @@ -12,13 +14,13 @@ jobs:
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v26
- uses: cachix/cachix-action@v14
with:
name: devenv
- name: Install devenv.sh
run: nix profile install nixpkgs#devenv
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v26
- uses: cachix/cachix-action@v14
with:
name: devenv
- name: Install devenv.sh
run: nix profile install nixpkgs#devenv

- name: Build the devenv shell and run any pre-commit hooks
run: devenv test
- name: Build the devenv shell and run any pre-commit hooks
run: devenv test
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name: "Test"
on:
pull_request:
push:
branches:
- main

jobs:
tests:
Expand All @@ -12,13 +14,13 @@ jobs:
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v26
- uses: cachix/cachix-action@v14
with:
name: devenv
- name: Install devenv.sh
run: nix profile install nixpkgs#devenv
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v26
- uses: cachix/cachix-action@v14
with:
name: devenv
- name: Install devenv.sh
run: nix profile install nixpkgs#devenv

- name: Build the devenv shell and run any pre-commit hooks
run: devenv test
- name: Build the devenv shell and run any pre-commit hooks
run: devenv test

0 comments on commit 6d36ebe

Please sign in to comment.