Skip to content

Commit

Permalink
Merge pull request #1 from adessoSE/dev/add-ci
Browse files Browse the repository at this point in the history
Add continuous integration with GitHub Actions
  • Loading branch information
BurningEnlightenment committed May 8, 2023
2 parents 63ffff7 + a9bc209 commit 47550c3
Show file tree
Hide file tree
Showing 3 changed files with 89 additions and 0 deletions.
66 changes: 66 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: CI
on:
push:
branches:
- master
- releases/v*
pull_request:

jobs:
validate-dependencies:
name: Validate dependencies
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16

- name: yarn install
run: yarn install --immutable --immutable-cache
if: ${{ github.event_name != 'pull_request' }}
- name: yarn install --check-cache
run: yarn install --immutable --immutable-cache --check-cache
if: ${{ github.event_name == 'pull_request' }}

compile:
name: Compile TypeScript
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16

- name: yarn install
run: yarn install --immutable --immutable-cache
- name: compile
run: yarn compile

lint:
name: Run ESLint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16

- name: yarn install
run: yarn install --immutable --immutable-cache
- name: lint
run: yarn lint

test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16

- name: yarn install
run: yarn install --immutable --immutable-cache
- name: jest
run: yarn test
19 changes: 19 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Publish
on:
release:
types: [published]

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16

- name: yarn install
run: yarn install --immutable --immutable-cache
- run: yarn npm publish --access public
env:
YARN_NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
4 changes: 4 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
plugins:
- path: .yarn/plugins/@yarnpkg/plugin-typescript.cjs
spec: "@yarnpkg/plugin-typescript"

npmScopes:
adesso-se:
npmPublishRegistry: https://registry.npmjs.org

0 comments on commit 47550c3

Please sign in to comment.