From d1f0b103fdf65ac78f6d8572e3322deb8abe3c04 Mon Sep 17 00:00:00 2001 From: David Dal Busco Date: Sat, 20 Jul 2024 18:16:54 +0200 Subject: [PATCH] chore: a github action to test frontend reproducibility (#663) Signed-off-by: David Dal Busco --- .github/actions/prepare/action.yml | 17 +++++++++++++++++ .../scripts/test-frontend-reproducibility | 0 .../workflows/frontend-reproducibility.yaml | 18 ++++++++++++++++++ 3 files changed, 35 insertions(+) create mode 100644 .github/actions/prepare/action.yml rename scripts/test-reproducibility => .github/scripts/test-frontend-reproducibility (100%) create mode 100644 .github/workflows/frontend-reproducibility.yaml diff --git a/.github/actions/prepare/action.yml b/.github/actions/prepare/action.yml new file mode 100644 index 000000000..0ce2b445c --- /dev/null +++ b/.github/actions/prepare/action.yml @@ -0,0 +1,17 @@ +name: Prepare + +description: Checkout and install dependencies + +runs: + using: composite + steps: + - uses: actions/setup-node@v4 + with: + node-version: 20 + registry-url: 'https://registry.npmjs.org' + - name: Install latest npm + shell: bash + run: npm install -g npm@latest + - name: Install dependencies + shell: bash + run: npm ci diff --git a/scripts/test-reproducibility b/.github/scripts/test-frontend-reproducibility similarity index 100% rename from scripts/test-reproducibility rename to .github/scripts/test-frontend-reproducibility diff --git a/.github/workflows/frontend-reproducibility.yaml b/.github/workflows/frontend-reproducibility.yaml new file mode 100644 index 000000000..eef40571b --- /dev/null +++ b/.github/workflows/frontend-reproducibility.yaml @@ -0,0 +1,18 @@ +name: Frontend Reproducibility + +on: + workflow_dispatch: + +jobs: + frontend-reproducibility: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Prepare + uses: ./.github/actions/prepare + + - name: Run reproducibility test + run: bash .github/scripts/test-frontend-reproducibility