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

Open
wants to merge 18 commits into
base: master
Choose a base branch
from
Open

ci: move out build run #1926

wants to merge 18 commits into from

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 Sep 30, 2024 9:44am

@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

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.

1 participant