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

Moved GitLab checks to GitHub's action #402

Merged
merged 6 commits into from
Apr 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 19 additions & 8 deletions .github/workflows/deploy-site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,22 @@ jobs:
working-directory: client
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
uses: actions/checkout@v4
- name: Install node
uses: actions/setup-node@v4.0.2
uses: actions/setup-node@v4
with:
node-version: 20
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT

- uses: actions/cache@v4
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- run: yarn install --frozen-lockfile
- run: yarn run check
- name: Install Playwright
Expand All @@ -33,7 +44,7 @@ jobs:
PUBLIC_CAPTCHA_KEY: 6LcgFI4nAAAAAATrEMoJ6zBacsx5udc1UhGFXemH
GITHUB_PAGES: "/${{ github.event.repository.name }}"
STATIC: true
- uses: actions/upload-artifact@v4.3.1
- uses: actions/upload-artifact@v4
with:
name: faucet
path: ./client/build
Expand All @@ -48,18 +59,18 @@ jobs:
needs: [build-faucet]
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
uses: actions/checkout@v4
- name: Download page
uses: actions/download-artifact@v4.1.4
uses: actions/download-artifact@v4
with:
name: faucet
path: ./dist
- name: Setup Pages
uses: actions/configure-pages@v4.0.0
uses: actions/configure-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v3.0.1
uses: actions/upload-pages-artifact@v3
with:
path: ./dist
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4.0.5
uses: actions/deploy-pages@v4
63 changes: 63 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Tests

on:
push:
branches: ["main"]
pull_request:
Bullrich marked this conversation as resolved.
Show resolved Hide resolved

permissions:
contents: read

jobs:
check-linting:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install node
uses: actions/setup-node@v4
with:
node-version: 20
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT

- uses: actions/cache@v4
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install deps in root
run: yarn install --frozen-lockfile
- run: yarn generate:papi:e2e
- name: Install deps in client
run: yarn install --frozen-lockfile
working-directory: client
- run: yarn typecheck
- run: yarn format
- run: yarn lint
check-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install node
uses: actions/setup-node@v4
with:
node-version: 20
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT

- uses: actions/cache@v4
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install deps in root
run: yarn install --frozen-lockfile
- run: yarn test
20 changes: 0 additions & 20 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,26 +93,6 @@ variables:
--file "$DOCKERFILE" .
- $BUILDAH_COMMAND info

#### stage: test

check-linting:
stage: test
<<: *common-refs
<<: *kubernetes-env
script:
- yarn --frozen-lockfile
- yarn generate:papi:e2e
- cd client && yarn --frozen-lockfile && cd ..
- yarn typecheck && yarn format && yarn lint

check-tests:
stage: test
<<: *common-refs
<<: *kubernetes-env
script:
- yarn --frozen-lockfile
- yarn test

#### stage: build

build-docker:
Expand Down
Loading