Skip to content

Commit

Permalink
ci: fix no cashing tests (#1775)
Browse files Browse the repository at this point in the history
  • Loading branch information
paul-schaaf committed Apr 12, 2022
1 parent 2544f1f commit e69879e
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 9 deletions.
24 changes: 16 additions & 8 deletions .github/workflows/no-cashing-tests.yaml
Expand Up @@ -43,9 +43,10 @@ jobs:
- uses: ./.github/actions/setup/

- run: cargo install --path cli anchor-cli --locked --force
- run: chmod +x ~/.cargo/bin/anchor
- uses: actions/upload-artifact@v2
with:
name: anchor-binary
name: anchor-binary-no-caching
path: ~/.cargo/bin/anchor

- uses: ./.github/actions/git-diff/
Expand All @@ -59,9 +60,10 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/download-artifact@v2
with:
name: anchor-binary
name: anchor-binary-no-caching
path: ~/.cargo/bin/
- run: chmod +rwx ~/.cargo/bin/anchor

- uses: ./.github/actions/setup/
- uses: ./.github/actions/setup-solana/
- uses: ./.github/actions/setup-ts/
Expand Down Expand Up @@ -92,9 +94,10 @@ jobs:

- uses: actions/download-artifact@v2
with:
name: anchor-binary
name: anchor-binary-no-caching
path: ~/.cargo/bin/
- run: chmod +rwx ~/.cargo/bin/anchor

- run: cd ${{ matrix.node.path }} && anchor build --skip-lint
- uses: actions/upload-artifact@v2
with:
Expand All @@ -114,8 +117,10 @@ jobs:

- uses: actions/download-artifact@v2
with:
name: anchor-binary
name: anchor-binary-no-caching
path: ~/.cargo/bin/
- run: chmod +x ~/.cargo/bin/anchor

- uses: actions/download-artifact@v2
with:
name: events.so
Expand Down Expand Up @@ -149,8 +154,9 @@ jobs:

- uses: actions/download-artifact@v2
with:
name: anchor-binary
name: anchor-binary-no-caching
path: ~/.cargo/bin/
- run: chmod +x ~/.cargo/bin/anchor

- run: solana-test-validator -r --quiet &
name: start validator
Expand Down Expand Up @@ -188,7 +194,7 @@ jobs:
shell: bash
- uses: actions/download-artifact@v2
with:
name: anchor-binary
name: anchor-binary-no-caching
path: ~/.cargo/bin/
- run: chmod +x ~/.cargo/bin/anchor

Expand All @@ -210,8 +216,9 @@ jobs:

- uses: actions/download-artifact@v2
with:
name: anchor-binary
name: anchor-binary-no-caching
path: ~/.cargo/bin/
- run: chmod +x ~/.cargo/bin/anchor

- run: cd "$(mktemp -d)" && anchor init hello-anchor && cd hello-anchor && yarn link @project-serum/anchor && anchor test && yarn lint:fix
- uses: ./.github/actions/git-diff/
Expand Down Expand Up @@ -287,8 +294,9 @@ jobs:

- uses: actions/download-artifact@v2
with:
name: anchor-binary
name: anchor-binary-no-caching
path: ~/.cargo/bin/
- run: chmod +x ~/.cargo/bin/anchor

- run: ${{ matrix.node.cmd }}
name: ${{ matrix.node.path }} program test
Expand Down
11 changes: 10 additions & 1 deletion .github/workflows/tests.yaml
Expand Up @@ -68,6 +68,7 @@ jobs:
./target/
key: cargo-${{ runner.os }}-anchor-${{ hashFiles('**/Cargo.lock') }}
- run: cargo install --path cli anchor-cli --locked --force
- run: chmod +x ~/.cargo/bin/anchor
- uses: actions/upload-artifact@v2
with:
name: anchor-binary
Expand All @@ -87,6 +88,7 @@ jobs:
name: anchor-binary
path: ~/.cargo/bin/
- run: chmod +rwx ~/.cargo/bin/anchor

- uses: ./.github/actions/setup/
- uses: ./.github/actions/setup-solana/
- uses: ./.github/actions/setup-ts/
Expand Down Expand Up @@ -150,6 +152,7 @@ jobs:
name: anchor-binary
path: ~/.cargo/bin/
- run: chmod +rwx ~/.cargo/bin/anchor

- run: cd ${{ matrix.node.path }} && anchor build --skip-lint
- uses: actions/upload-artifact@v2
with:
Expand All @@ -171,6 +174,8 @@ jobs:
with:
name: anchor-binary
path: ~/.cargo/bin/
- run: chmod +x ~/.cargo/bin/anchor

- uses: actions/download-artifact@v2
with:
name: events.so
Expand Down Expand Up @@ -224,6 +229,7 @@ jobs:
with:
name: anchor-binary
path: ~/.cargo/bin/
- run: chmod +x ~/.cargo/bin/anchor

- uses: actions/cache@v2
name: Cache tests/bpf-upgradeable-state target
Expand Down Expand Up @@ -279,6 +285,7 @@ jobs:
name: anchor-binary
path: ~/.cargo/bin/
- run: chmod +x ~/.cargo/bin/anchor

- uses: actions/cache@v2
name: Cache tests/misc target
id: cache-test-target
Expand Down Expand Up @@ -318,6 +325,7 @@ jobs:
with:
name: anchor-binary
path: ~/.cargo/bin/
- run: chmod +x ~/.cargo/bin/anchor

- run: cd "$(mktemp -d)" && anchor init hello-anchor && cd hello-anchor && yarn link @project-serum/anchor && anchor test && yarn lint:fix
- uses: ./.github/actions/git-diff/
Expand Down Expand Up @@ -407,7 +415,8 @@ jobs:
with:
name: anchor-binary
path: ~/.cargo/bin/

- run: chmod +x ~/.cargo/bin/anchor

- uses: actions/cache@v2
name: Cache ${{ matrix.node.path }} target
id: cache-test-target
Expand Down

0 comments on commit e69879e

Please sign in to comment.