mirror of
https://github.com/darkwire/darkwire.io.git
synced 2025-07-18 10:49:02 +00:00
Add github action
This commit is contained in:
parent
0df6a5097c
commit
ec2915d1d5
@ -1,49 +0,0 @@
|
||||
# Javascript Node CircleCI 2.0 configuration file
|
||||
#
|
||||
|
||||
jobs:
|
||||
test-job:
|
||||
docker:
|
||||
- image: "cimg/node:lts"
|
||||
|
||||
working_directory: ~/repo
|
||||
|
||||
steps:
|
||||
- checkout
|
||||
# Download and cache dependencies
|
||||
- restore_cache:
|
||||
keys:
|
||||
- dependencies-{{ checksum "yarn.lock" }}
|
||||
# fallback to using the latest cache if no exact match is found
|
||||
- dependencies-
|
||||
|
||||
- run: yarn setup
|
||||
|
||||
- save_cache:
|
||||
paths:
|
||||
- node_modules
|
||||
- client/node_modules
|
||||
- server/node_modules
|
||||
key: dependencies-{{ checksum "yarn.lock" }}
|
||||
|
||||
- run:
|
||||
command: yarn lint
|
||||
|
||||
- run:
|
||||
command: yarn test
|
||||
environment:
|
||||
TZ: UTC
|
||||
VITE_COMMIT_SHA: some_sha
|
||||
|
||||
- store_artifacts: # For coverage report
|
||||
path: client/coverage
|
||||
|
||||
orbs: # declare what orbs we are going to use
|
||||
node: circleci/node@2.0.2 # the node orb provides common node-related configuration
|
||||
|
||||
version: 2.1
|
||||
|
||||
workflows:
|
||||
tests:
|
||||
jobs:
|
||||
- test-job
|
32
.github/workflows/lint-test.yml
vendored
Normal file
32
.github/workflows/lint-test.yml
vendored
Normal file
@ -0,0 +1,32 @@
|
||||
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
|
||||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
|
||||
|
||||
name: Node.js CI
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [16.x, 18.x]
|
||||
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
cache: 'npm'
|
||||
- run: npm i yarn -g
|
||||
- run: yarn setup
|
||||
env:
|
||||
TZ: UTC
|
||||
VITE_COMMIT_SHA: some_sha
|
||||
- run: yarn lint
|
||||
- run: yarn test
|
Loading…
x
Reference in New Issue
Block a user