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