Skip to content

Draft: Mad CI experiments #118

Draft: Mad CI experiments

Draft: Mad CI experiments #118

Workflow file for this run

name: CI
on:
pull_request:
push:
branches: [main]
jobs:
Test:
name: ${{ matrix.os }} - Pulsar
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
steps:
- uses: actions/checkout@v3
- uses: pulsar-edit/[email protected]
- uses: actions/setup-node@v3
with:
node-version: 'lts/*'
- uses: volta-cli/action@v4
- name: Install multiple Node versions
if: runner.os != 'Windows'
run: |
volta install node@latest
echo "NODE_LATEST=$(volta which node)" >> $GITHUB_ENV
echo "NODE_LATEST_VERSION=$(node --version)" >> $GITHUB_ENV
volta install node@18
echo "NODE_DEFAULT=$(volta which node)" >> $GITHUB_ENV
echo "NODE_DEFAULT_VERSION=$(node --version)" >> $GITHUB_ENV
- name: Install multiple Node versions (Windows)
if: runner.os == 'Windows'
run: |
volta install node@latest
echo "NODE_LATEST=$(volta which node)" >> $env:GITHUB_ENV
echo "NODE_LATEST_VERSION=$(node --version)" >> $env:GITHUB_ENV
volta install node@18
echo "NODE_DEFAULT=$(volta which node)" >> $env:GITHUB_ENV
echo "NODE_DEFAULT_VERSION=$(node --version)" >> $env:GITHUB_ENV
- name: Setup dummy ESLint projects
run: |
mkdir ~/with-eslint-6 && cd ~/with-eslint-6
npm init --yes
npm install eslint@6
cd ..
mkdir ~/with-eslint-7 && cd ~/with-eslint-7
npm init --yes
npm install eslint@7
cd ..
mkdir ~/with-eslint-8 && cd ~/with-eslint-8
npm init --yes
npm install eslint@8
cd ..
mkdir ~/with-eslint-latest && cd ~/with-eslint-latest
npm init --yes
npm install eslint@latest
cd ..
- name: Install dependencies (Windows)
if: runner.os == 'Windows'
run: |
ppm install
npm install
npx atom-package-deps ./windows-deps
- name: Install dependencies
if: runner.os != 'Windows'
run: |
pulsar --package install
pulsar --package install linter-eslint
npx atom-package-deps .
- name: List dependencies
run: |
pulsar --package list --enabled --packages
- name: Run tests 👩🏾‍💻
uses: coactions/setup-xvfb@v1
with:
run: pulsar --test spec
Lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install dependencies
run: npm install
- name: Lint ✨
run: npm run test.lint
Release:
needs: [Test, Lint]
if: github.ref == 'refs/heads/main' &&
github.event.repository.fork == false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: pulsar-edit/[email protected]
- uses: actions/setup-node@v3
with:
node-version: "lts/*"
- name: NPM install
run: npm install
- name: Release 🎉
uses: cycjimmy/semantic-release-action@v3
with:
branches: |
['main']
extends: |
@semantic-release/apm-config
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ATOM_ACCESS_TOKEN: ${{ secrets.ATOM_ACCESS_TOKEN }}