Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: move out build run #1926

Merged
merged 23 commits into from
Oct 22, 2024
Merged

ci: move out build run #1926

merged 23 commits into from
Oct 22, 2024

Conversation

fionnachan
Copy link
Member

@fionnachan fionnachan commented Sep 25, 2024

Closes FS-871

Copy link

vercel bot commented Sep 25, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
arbitrum-token-bridge ✅ Ready (Inspect) Visit Preview Oct 22, 2024 4:16pm

@fionnachan fionnachan marked this pull request as ready for review September 26, 2024 14:56
name: Cache build artifacts

on:
workflow_call:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a reusable workflow, not a composite workflow

https://docs.github.com/en/actions/sharing-automations/reusing-workflows

Comment on lines +20 to +26
- name: Check cache for build artifacts
id: cache
uses: actions/cache/restore@v4
with:
path: |
./packages/arb-token-bridge-ui/build
key: build-artifacts-${{ github.run_id }}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we try to find it from cache first, and if it's not there, then we run build, otherwise just use the cache

this is similar to the approach we use for node modules in our actions repo

Comment on lines +30 to +33
build:
name: 'Build'
uses: ./.github/workflows/build.yml
secrets: inherit
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

moved into here

and now the build won't be run twice ever on the same run


- name: Start UI and Test
run: yarn start-server-and-test 'start' http://127.0.0.1:3000 'yarn test:ci'

audit:
name: "Audit"
runs-on: ubuntu-latest
needs: build
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it never needed the build files

chrstph-dvx
chrstph-dvx previously approved these changes Oct 17, 2024
.github/workflows/test.yml Outdated Show resolved Hide resolved
douglance
douglance previously approved these changes Oct 18, 2024
@fionnachan fionnachan dismissed stale reviews from douglance and chrstph-dvx via 5a83cad October 22, 2024 14:17
douglance
douglance previously approved these changes Oct 22, 2024
chrstph-dvx
chrstph-dvx previously approved these changes Oct 22, 2024
@fionnachan fionnachan dismissed stale reviews from chrstph-dvx and douglance via 780179e October 22, 2024 16:13
@fionnachan fionnachan merged commit 2e1e23c into master Oct 22, 2024
50 checks passed
@fionnachan fionnachan deleted the fix-build branch October 22, 2024 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants