From f5784df67c73c3fa6d2d6260f051a1c979b8e8e4 Mon Sep 17 00:00:00 2001 From: JordyRo1 Date: Wed, 15 May 2024 14:30:32 +0200 Subject: [PATCH] fix: ci working directory --- .github/workflows/release.yml | 6 ++++++ .github/workflows/test.yml | 11 ++++++----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c32b618..93b800b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,12 +18,15 @@ jobs: - uses: actions/checkout@v4 - uses: software-mansion/setup-scarb@v1 - name: Build contracts + working-directory: ./contracts run: scarb build - name: Archive contracts + working-directory: ./contracts run: | mkdir -p filtered_artifacts find ./contracts/target/dev -type f -name '*.contract_class.json' -exec cp {} filtered_artifacts/ \; - name: Generate checksums + working-directory: ./contracts run: | cd filtered_artifacts for file in *; do @@ -31,6 +34,7 @@ jobs: md5sum "$file" > "$file.md5" done - name: Build artifact zip + working-directory: ./contracts run: | cd filtered_artifacts zip -r ../hyperlane-starknet-${{ github.ref_name }}.zip . @@ -39,11 +43,13 @@ jobs: md5sum hyperlane-starknet-${{ github.ref_name }}.zip > hyperlane-starknet-${{ github.ref_name }}.CHECKSUM.MD5 - name: Find zip files + working-directory: ./contracts run: | find ./filtered_artifacts -type f -name '*.zip' -exec echo "::set-output name=zip_files::{}" \; id: find_zip_files - name: Release Artifact + working-directory: ./contracts uses: softprops/action-gh-release@v1 with: files: | diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 494d8fa..fa3c584 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -3,14 +3,15 @@ on: push: pull_request: jobs: - env: - working-directory: ./contracts check: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - uses: software-mansion/setup-scarb@v1 - uses: foundry-rs/setup-snfoundry@v3 - - run: scarb fmt --check - - run: scarb build - - run: snforge test \ No newline at end of file + - working-directory: ./contracts + run: scarb fmt --check + - working-directory: ./contracts + run: scarb build + - working-directory: ./contracts + run: snforge test \ No newline at end of file