chore: update copyright notice in source files #349
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright (c) 2016-2024 Knuth Project developers. | |
# Distributed under the MIT software license, see the accompanying | |
# file COPYING or http://www.opensource.org/licenses/mit-license.php. | |
name: Build and Test | |
on: [push, pull_request] | |
# on: | |
# release: | |
# types: [created] | |
jobs: | |
execute-linter: | |
name: Execute ESLint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- name: Install modules | |
run: npm install | |
# - name: Run ESLint | |
# run: npm run lint:github-action | |
generate-matrix: | |
needs: execute-linter | |
name: Generate Job Matrix | |
if: github.ref == 'refs/heads/master' | |
runs-on: ubuntu-latest | |
outputs: | |
matrix: ${{ steps.set-matrix.outputs.matrix }} | |
steps: | |
- name: Generate Job Matrix | |
id: set-matrix | |
env: | |
MATRIX: '{"config": [ | |
{"name": "macOS NodeJS 18","nodejs_version": "18","os": "macos-12","os_kind": "macos","test": "0"} | |
]}' | |
# MATRIX: '{"config": [ | |
# {"name": "macOS NodeJS 18","nodejs_version": "18","os": "macos-12","os_kind": "macos","test": "0"}, | |
# {"name": "macOS NodeJS 16","nodejs_version": "16","os": "macos-12","os_kind": "macos","test": "0"}, | |
# {"name": "macOS NodeJS 14","nodejs_version": "14","os": "macos-12","os_kind": "macos","test": "0"}, | |
# ]}' | |
# {"name": "macOS NodeJS 12","nodejs_version": "12","os": "macos-12","os_kind": "macos","test": "0"}, | |
# MATRIX: '{"config": [{"name": "Linux (GCC11) NodeJS 16","nodejs_version": "16","os": "ubuntu-16.04","os_kind": "linux","test": "1"}, | |
# {"name": "Linux (GCC11) NodeJS 14","nodejs_version": "14","os": "ubuntu-16.04","os_kind": "linux","test": "1"}, | |
# {"name": "Linux (GCC11) NodeJS 12","nodejs_version": "12","os": "ubuntu-16.04","os_kind": "linux","test": "1"}, | |
# {"name": "macOS NodeJS 16","nodejs_version": "16","os": "macos-12","os_kind": "macos","test": "0"}, | |
# {"name": "macOS NodeJS 14","nodejs_version": "14","os": "macos-12","os_kind": "macos","test": "0"}, | |
# {"name": "macOS NodeJS 12","nodejs_version": "12","os": "macos-12","os_kind": "macos","test": "0"}, | |
# ]}' | |
# MATRIX: '{"config": [{"name": "Linux NodeJS 16","nodejs_version": "16","os": "ubuntu-20.04","os_kind": "linux","test": "1"}, | |
# {"name": "Linux NodeJS 14","nodejs_version": "14","os": "ubuntu-20.04","os_kind": "linux","test": "1"}, | |
# {"name": "Linux NodeJS 12","nodejs_version": "12","os": "ubuntu-20.04","os_kind": "linux","test": "1"}, | |
# {"name": "macOS NodeJS 16","nodejs_version": "16","os": "macos-11","os_kind": "macos","test": "0"}, | |
# {"name": "macOS NodeJS 14","nodejs_version": "14","os": "macos-11","os_kind": "macos","test": "0"}, | |
# {"name": "macOS NodeJS 12","nodejs_version": "12","os": "macos-11","os_kind": "macos","test": "0"}, | |
# {"name": "Windows NodeJS 16","nodejs_version": "16","os": "windows-2019","os_kind": "windows","test": "1"}, | |
# {"name": "Windows NodeJS 14","nodejs_version": "14","os": "windows-2019","os_kind": "windows","test": "1"}, | |
# {"name": "Windows NodeJS 12","nodejs_version": "12","os": "windows-2019","os_kind": "windows","test": "1"}, | |
# ]}' | |
run: | | |
echo "${MATRIX}" | |
echo "matrix=${MATRIX}" >> $GITHUB_OUTPUT | |
builds: | |
needs: generate-matrix | |
runs-on: ${{ matrix.config.os }} | |
strategy: | |
fail-fast: false | |
matrix: ${{fromJson(needs.generate-matrix.outputs.matrix)}} | |
name: ${{ matrix.config.name }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.config.nodejs_version }} | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.9" | |
# - name: Settting EnvVars (Unix) | |
# if: ${{ matrix.config.os_kind != 'windows' }} | |
# shell: bash | |
# run: | | |
# echo "NODEJS_VERSION=${{ matrix.config.nodejs_version }}" >> $GITHUB_ENV | |
# echo "KTH_GHA_MARCH_ID=${{ matrix.config.march_id }}" >> $GITHUB_ENV | |
# echo "KTH_GHA_RUN_TESTS=${{ matrix.config.test }}" >> $GITHUB_ENV | |
# - name: Settting EnvVars (Windows) | |
# if: ${{ matrix.config.os_kind == 'windows' }} | |
# shell: powershell | |
# run: | | |
# echo "NODEJS_VERSION=${{ matrix.config.nodejs_version }}" >> $Env:GITHUB_ENV | |
# echo "KTH_GHA_MARCH_ID=${{ matrix.config.march_id }}" >> $Env:GITHUB_ENV | |
# echo "KTH_GHA_RUN_TESTS=${{ matrix.config.test }}" >> $Env:GITHUB_ENV | |
- run: python --version | |
- run: python3 --version | |
# - run: npm install --loglevel verbose | |
- run: npm install | |
- run: git status | |
- run: git diff | |
- run: npm ci | |
# - run: npm test --runInBand | |
- run: npm test -- --verbose=true | |
if: ${{ matrix.config.test == '1' }} | |
publish-npm: | |
needs: builds | |
runs-on: ubuntu-latest | |
name: Public NPM | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
registry-url: https://registry.npmjs.org/ | |
- run: npm ci | |
- run: npm publish --access public | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}} | |
# publish: | |
# runs-on: ubuntu-latest | |
# steps: | |
# - uses: actions/checkout@v3 | |
# # Setup .npmrc file to publish to npm | |
# - uses: actions/setup-node@v3 | |
# with: | |
# node-version: 16 | |
# registry-url: 'https://registry.npmjs.org' | |
# - run: npm install | |
# # Publish to npm | |
# - run: npm publish --access public | |
# env: | |
# NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} | |
# # Setup .npmrc file to publish to GitHub Packages | |
# - uses: actions/setup-node@v3 | |
# with: | |
# registry-url: 'https://npm.pkg.github.com' | |
# # Defaults to the user or organization that owns the workflow file | |
# scope: '@octocat' | |
# # Publish to GitHub Packages | |
# - run: npm publish | |
# env: | |
# NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# publish-npm: | |
# needs: builds | |
# runs-on: ubuntu-latest | |
# name: Public NPM | |
# steps: | |
# - uses: actions/checkout@v3 | |
# - uses: actions/setup-node@v3 | |
# with: | |
# node-version: 16 | |
# - run: npm install | |
# - run: npm test | |
# # - run: npm ci | |
# - uses: JS-DevTools/npm-publish@v1 | |
# with: | |
# token: ${{ secrets.NPM_AUTH_TOKEN }} | |
# registry: https://registry.npmjs.org/ | |
# publish-gpr: | |
# needs: builds | |
# runs-on: ubuntu-latest | |
# name: Public GPR | |
# steps: | |
# - uses: actions/checkout@v3 | |
# - uses: actions/setup-node@v3 | |
# with: | |
# node-version: 16 | |
# - run: npm install | |
# # - run: npm test | |
# # - run: npm ci | |
# - uses: JS-DevTools/npm-publish@v1 | |
# with: | |
# token: ${{ secrets.GITHUB_TOKEN }} | |
# registry: https://npm.pkg.github.com/ | |
# publish-npm: | |
# needs: builds | |
# runs-on: ubuntu-latest | |
# name: Public NPM | |
# steps: | |
# - uses: actions/checkout@v3 | |
# - uses: actions/setup-node@v3 | |
# with: | |
# node-version: 16 | |
# registry-url: https://registry.npmjs.org/ | |
# - run: npm ci | |
# - run: npm publish | |
# env: | |
# NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}} | |
# publish-gpr: | |
# # needs: publish-npm | |
# needs: builds | |
# runs-on: ubuntu-latest | |
# name: Public GPR | |
# steps: | |
# - uses: actions/checkout@v3 | |
# - uses: actions/setup-node@v3 | |
# with: | |
# node-version: 16 | |
# registry-url: https://npm.pkg.github.com/ | |
# # - run: npm login | |
# # - run: npm ci | |
# - run: npm ci | |
# - run: npm publish | |
# env: | |
# NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} | |