Skip to content

Commit

Permalink
Switch to using yarn
Browse files Browse the repository at this point in the history
  • Loading branch information
theseanything committed Jul 23, 2024
1 parent 7908396 commit 12b7ea2
Show file tree
Hide file tree
Showing 4 changed files with 691 additions and 1,364 deletions.
10 changes: 4 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,11 @@ jobs:
with:
show-progress: false

- uses: actions/setup-node@v4
with:
node-version: 20
cache: "npm"
- name: Setup Node
uses: alphagov/govuk-infrastructure/.github/actions/setup-node@main

- name: Run eslint
run: npx eslint .
run: yarn run eslint .

- name: Run prettier
run: npx prettier --check .
run: yarn run prettier --check .
11 changes: 6 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,21 @@ RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | gpg --dear

RUN apt-get install -y --no-install-recommends nodejs npm;\
echo -n node version:\ ; node -v; \
echo -n npm version:\ ; npm -v;
echo -n npm version:\ ; npm -v; \
npm install -g yarn@1.22.19

RUN ln -fs /tmp $APP_HOME
RUN groupadd -g 1001 app; \
useradd -u 1001 -g app app --home $APP_HOME

WORKDIR $APP_HOME
COPY package.json package-lock.json ./
RUN npm install
RUN PLAYWRIGHT_BROWSERS_PATH=$APP_HOME/.cache/ms-playwright npx playwright install --with-deps chromium && \
COPY package.json yarn.lock ./
RUN yarn install --immutable
RUN PLAYWRIGHT_BROWSERS_PATH=$APP_HOME/.cache/ms-playwright yarn playwright install --with-deps chromium && \
rm -r /var/lib/apt/lists /var/cache/apt/archives

COPY playwright.config.js ./
COPY tests/ ./tests/
COPY lib/ ./lib/
USER app
CMD [ "npx", "playwright", "test", "--reporter=dot" ]
CMD [ "yarn", "playwright", "test", "--reporter=dot" ]
Loading

0 comments on commit 12b7ea2

Please sign in to comment.