Skip to content

fixed skipped tests

fixed skipped tests #6

Workflow file for this run

name: 'build-test'
on: # rebuild any PRs and main branch changes
pull_request:
push:
branches:
- main
- 'releases/*'
jobs:
build: # make sure build/ci work properly
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20.11.0
- name: Cache node modules
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- run: npm ci
- run: npm run build-package
- name: Check that the build file has been committed.
run: |
if [ -z "$(git status --porcelain)" ]; then
echo "OK, workspace is clean"
else
echo "Failed, workspace is not clean"
exit 1
fi
unittest-and-lint: # make sure build/ci work properly
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20.11.0
- name: Cache node modules
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- run: npm ci
- run: npm run test-lint
- name: Run Jest
run: npm run test:ci
- uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
directory: ./coverage/ # optional
fail_ci_if_error: true # optional2 (default = false)
- name: Upload test report
if: ${{ always() }}
uses: mikepenz/action-junit-report@v2
with:
report_paths: '**/reports/jest.xml'
github_token: ${{ secrets.GITHUB_TOKEN }}
e2e-test: # make sure the action works on a clean machine without building
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: test for normal
uses: ./
with:
issueFilePath: "./src/__tests__/test.md"
apiKey: "apiKey"
teamId: "teamId"
stateId: "stateId"
isDryrun: "true"
- name: test for embed
uses: ./
with:
issueFilePath: "./src/__tests__/test_with_replace.md"
apiKey: "apiKey"
teamId: "teamId"
stateId: "stateId"
isDryrun: "true"
embed: "month=July,day=13"