From 9f2ad46c55c567442aae5c928cfa192fc93406c3 Mon Sep 17 00:00:00 2001 From: Richard Cox Date: Mon, 15 Apr 2024 14:15:33 +0100 Subject: [PATCH] Create generic setup --- .github/actions/setup/action.yaml | 18 ++++++++++++++++++ .github/workflows/test.yaml | 26 ++++++-------------------- 2 files changed, 24 insertions(+), 20 deletions(-) create mode 100644 .github/actions/setup/action.yaml diff --git a/.github/actions/setup/action.yaml b/.github/actions/setup/action.yaml new file mode 100644 index 0000000000..2f1f02da98 --- /dev/null +++ b/.github/actions/setup/action.yaml @@ -0,0 +1,18 @@ +name: Setup UI Env +description: Setup node, python and call bootstrap script + +runs: + using: 'composite' + steps: + - uses: actions/setup-node@v3 + with: + node-version: '14.x' + + - name: Install Python for node-sass + shell: bash + run: | + DEBIAN_FRONTEND=noninteractive sudo apt-get install -y --no-install-recommends python2 + + - name: Install packages + shell: bash + run: ./scripts/bootstrap diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index a1d3bd5589..6a5e443c7c 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -16,17 +16,10 @@ jobs: - uses: actions/checkout@v3 with: fetch-depth: 1 - - uses: actions/setup-node@v3 - with: - node-version: '14.x' - - name: Install Python for node-sass - run: | - DEBIAN_FRONTEND=noninteractive sudo apt-get install -y --no-install-recommends python2 - - - name: Install packages - run: ./scripts/bootstrap - + - name: Run Setup + uses: ./.github/actions/setup + - name: Run tests run: yarn test lint: @@ -35,16 +28,9 @@ jobs: - uses: actions/checkout@v3 with: fetch-depth: 1 - - uses: actions/setup-node@v3 - with: - node-version: '14.x' - - name: Install Python for node-sass - run: | - DEBIAN_FRONTEND=noninteractive sudo apt-get install -y --no-install-recommends python2 - - - name: Install packages - run: ./scripts/bootstrap - + - name: Run Setup + uses: ./.github/actions/setup + - name: Run linter run: yarn lint:js