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

fix: update ci workflow #23

Merged
merged 7 commits into from
Jul 15, 2021
Merged
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
38 changes: 22 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,37 @@ on:
branches:
- main
- next
pull_request_target:
branches:
- main
- next

permissions:
checks: write
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
ci:
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
node: [16]

steps:
- name: Checkout 🛎
uses: actions/checkout@master
- name: Check out repository ✨
if: ${{ github.event_name == 'push' || github.event_name == 'pull_request' }}
uses: actions/checkout@v2

- name: Check out repository 🎉 (dependabot)
if: ${{ github.event_name == 'pull_request_target' && github.actor == 'dependabot[bot]' }}
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}

Expand All @@ -32,23 +50,11 @@ jobs:
check-latest: true
registry-url: https://registry.npmjs.org
scope: '@geoql'
cache: 'npm'

- name: Upgrade npm 🎉
run: npm install -g npm@latest

- name: Get npm cache directory 🏗
id: npm-cache
run: echo "::set-output name=dir::$(npm config get cache)"

- name: Restore cached node_modules 🤷‍♂️
uses: actions/cache@v2.1.6
with:
path: |
${{ steps.npm-cache.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-

- name: Install dependencies 🚀
run: npm ci --prefer-offline --no-audit --no-optional

Expand All @@ -60,13 +66,13 @@ jobs:
git_name: github-actions[bot]
git_email: github-actions[bot]@users.noreply.github.com
auto_fix: false
neutral_check_on_warning: true
stylelint: true
stylelint_extensions: css,scss,vue
eslint: true
eslint_extensions: js,ts,vue
prettier: true
prettier_extensions: js,ts,vue
neutral_check_on_warning: true

- name: Build the package 🎉
run: npm run build