Skip to content
This repository was archived by the owner on Jul 5, 2023. It is now read-only.

Commit a5650a5

Browse files
author
hauntsaninja
committed
run tests, remove travis, don't make release
1 parent e09a4d2 commit a5650a5

File tree

2 files changed

+3
-122
lines changed

2 files changed

+3
-122
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
name: Build wheels
22

3-
on:
4-
push:
5-
branches: [master]
6-
tags: ['*']
3+
on: [push, pull_request]
74

85
jobs:
96
build_wheels:
@@ -32,6 +29,8 @@ jobs:
3229
CIBW_SKIP: "*-manylinux_i686 *-win32"
3330
CIBW_ARCHS_MACOS: "x86_64 arm64"
3431
CIBW_BUILD_VERBOSITY: 1
32+
CIBW_BEFORE_TEST: pip install pytest
33+
CIBW_TEST_COMMAND: pytest {package}
3534
run: |
3635
python -m cibuildwheel --output-dir wheelhouse .
3736
- uses: actions/upload-artifact@v2
@@ -60,44 +59,3 @@ jobs:
6059
name: dist
6160
path: |
6261
dist/*.tar.gz
63-
release:
64-
name: create release
65-
needs: [build_wheels, build_sdist_python_wheel]
66-
runs-on: ubuntu-latest
67-
steps:
68-
- name: Download artifact
69-
uses: actions/download-artifact@v2
70-
with:
71-
name: dist
72-
path: dist
73-
- name: Release
74-
# https://github.com/actions/upload-release-asset/issues/47
75-
uses: actions/github-script@v2
76-
with:
77-
github-token: ${{secrets.GITHUB_TOKEN}}
78-
script: |
79-
const fs = require('fs').promises;
80-
const { repo: { owner, repo }, sha } = context;
81-
82-
console.log('environment', process.versions);
83-
console.log({ owner, repo, sha });
84-
85-
const release = await github.repos.createRelease({
86-
owner, repo,
87-
// if GITHUB_REF just appears to be a branch, use tag-{commit} as the tag
88-
tag_name: process.env.GITHUB_REF.includes("refs/heads/") ? "tag-" + sha : process.env.GITHUB_REF.split("/").pop(),
89-
target_commitish: sha
90-
});
91-
92-
console.log('created release', { release });
93-
94-
for (let file of await fs.readdir('dist')) {
95-
console.log('uploading', file);
96-
97-
await github.repos.uploadReleaseAsset({
98-
owner, repo,
99-
release_id: release.data.id,
100-
name: file,
101-
data: await fs.readFile(`./dist/${file}`)
102-
});
103-
}

.travis.yml

Lines changed: 0 additions & 77 deletions
This file was deleted.

0 commit comments

Comments
 (0)