Explorar el Código

ci: fix no cashing tests (#1775)

Paul hace 3 años
padre
commit
e69879e3e8
Se han modificado 2 ficheros con 26 adiciones y 9 borrados
  1. 16 8
      .github/workflows/no-cashing-tests.yaml
  2. 10 1
      .github/workflows/tests.yaml

+ 16 - 8
.github/workflows/no-cashing-tests.yaml

@@ -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/
@@ -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/
@@ -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:
@@ -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
@@ -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
@@ -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
       
@@ -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/
@@ -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

+ 10 - 1
.github/workflows/tests.yaml

@@ -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
@@ -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/
@@ -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:
@@ -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
@@ -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
@@ -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
@@ -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/
@@ -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