|
1 | | -name: Package and Publish |
| 1 | +name: Package and Publish to PyPi |
2 | 2 |
|
3 | 3 | on: |
4 | 4 | release: |
@@ -36,14 +36,19 @@ jobs: |
36 | 36 | # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide |
37 | 37 | flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics |
38 | 38 | |
39 | | - - name: Test with pytest |
| 39 | + - name: Run unit tests |
| 40 | + shell: bash -l {0} |
40 | 41 | run: | |
41 | | - pytest --cov=chartlets |
42 | | - |
| 42 | + pytest --cov=chartlets --cov-report=xml |
| 43 | +
|
43 | 44 | - name: Upload coverage reports to Codecov |
44 | | - uses: codecov/codecov-action@v3 |
45 | | - env: |
46 | | - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |
| 45 | + uses: codecov/codecov-action@v4 |
| 46 | + with: |
| 47 | + fail_ci_if_error: true |
| 48 | + directory: chartlets.py/ |
| 49 | + flags: backend |
| 50 | + verbose: true |
| 51 | + token: ${{ secrets.CODECOV_TOKEN }} |
47 | 52 |
|
48 | 53 | PyPi-Deploy: |
49 | 54 | name: Publish Python Package to PyPI |
|
77 | 82 | password: ${{ secrets.PYPI_API_TOKEN }} |
78 | 83 | packages_dir: chartlets.py/dist |
79 | 84 | verbose: true |
80 | | - |
81 | | - npm-tests: |
82 | | - runs-on: ubuntu-latest |
83 | | - strategy: |
84 | | - matrix: |
85 | | - node-version: [16.x, 18.x, 20.x] |
86 | | - # See supported Node.js release schedule at |
87 | | - # https://nodejs.org/en/about/releases/ |
88 | | - defaults: |
89 | | - run: |
90 | | - working-directory: chartlets.js |
91 | | - |
92 | | - steps: |
93 | | - - uses: actions/checkout@v3 |
94 | | - - name: Use Node.js ${{ matrix.node-version }} |
95 | | - uses: actions/setup-node@v3 |
96 | | - with: |
97 | | - node-version: ${{ matrix.node-version }} |
98 | | - cache: 'npm' |
99 | | - cache-dependency-path: chartlets.js/package-lock.json |
100 | | - |
101 | | - - run: npm ci |
102 | | - - run: npm run lint |
103 | | - - run: npm run build |
104 | | - - run: npm run test |
105 | | - |
106 | | - npm-Deploy: |
107 | | - name: Publish TS-React Package to npmjs |
108 | | - runs-on: ubuntu-latest |
109 | | - needs: npm-tests |
110 | | - defaults: |
111 | | - run: |
112 | | - working-directory: chartlets.js |
113 | | - |
114 | | - steps: |
115 | | - - uses: actions/checkout@v4 |
116 | | - |
117 | | - - name: Set up Node.js |
118 | | - uses: actions/setup-node@v4 |
119 | | - with: |
120 | | - node-version: '18.x' |
121 | | - registry-url: 'https://registry.npmjs.org' |
122 | | - cache: 'npm' |
123 | | - cache-dependency-path: chartlets.js/package-lock.json |
124 | | - |
125 | | - - run: npm ci |
126 | | - - run: | |
127 | | - cd packages/lib |
128 | | - npm run build |
129 | | - - run: | |
130 | | - cd packages/lib |
131 | | - npm publish --access public |
132 | | - env: |
133 | | - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
0 commit comments