name: CI on: push: branches: - master paths: - src/**.scss - package.json - Gruntfile.coffee - .stylelintrc - .stylelintignore pull_request: branches: - master jobs: # Test Lint lint: # Use Ubuntu 22.04 LTS runs-on: ubuntu-22.04 steps: # Step I - name: Get Source Code uses: actions/checkout@v3 # Step II - name: Setup Node.js uses: actions/setup-node@v3 with: node-version: lts/* registry-url: https://registry.npmjs.com # Step III - name: Install Dependencies run: npm ci # Step IV - name: Test Lint run: npm run lint # Test Build build: # Use Ubuntu Linux, Windows and OS X runs-on: ${{ matrix.os }} strategy: matrix: node-version: [16, 18, latest] os: [ubuntu-latest, windows-latest, macos-latest] fail-fast: false steps: # Step I - name: Get Source Code uses: actions/checkout@v3 # Step II - name: Setup Node.js uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} registry-url: https://registry.npmjs.com # Step III - name: Install Dependencies run: npm ci # Step IV - name: Test Build run: npm run build # Step V - name: Upload Artifact uses: actions/upload-artifact@v3 with: name: built-on__os_${{ matrix.os }}__nodejs_${{ matrix.node-version }} path: dist/ retention-days: 3 # Authored by @kuohuanhuan.