Merge pull request #299 from nix-community/github-actions
switch to github actions from travis
This commit is contained in:
commit
31c02467a1
8 changed files with 56 additions and 52 deletions
6
.github/dependabot.yml
vendored
Normal file
6
.github/dependabot.yml
vendored
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
12
.github/workflows/pr.yml
vendored
Normal file
12
.github/workflows/pr.yml
vendored
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
name: "Test"
|
||||
on:
|
||||
pull_request:
|
||||
jobs:
|
||||
tests:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: cachix/install-nix-action@v12
|
||||
with:
|
||||
nix_path: nixpkgs=channel:nixos-unstable
|
||||
- run: ./ci/test.sh
|
||||
22
.github/workflows/update.yml
vendored
Normal file
22
.github/workflows/update.yml
vendored
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
name: "Test"
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
# chosen by fair dice rolling
|
||||
- cron: '05 4 * * *'
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
jobs:
|
||||
tests:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: cachix/install-nix-action@v12
|
||||
with:
|
||||
nix_path: nixpkgs=channel:nixos-unstable
|
||||
- run: ./ci/test.sh
|
||||
- name: update nur / nur-combined
|
||||
run: ./ci/update-nur.sh
|
||||
- name: update nur-search/data/packages.json
|
||||
run: ./ci/update-nur-search.sh
|
||||
25
.travis.yml
25
.travis.yml
|
|
@ -1,25 +0,0 @@
|
|||
version: ~> 1.0
|
||||
import: nix-community/nix-travis-ci:nix.yml@main
|
||||
|
||||
notifications:
|
||||
irc:
|
||||
on_success: change
|
||||
on_failure: always
|
||||
channels:
|
||||
- "irc.freenode.net#nixos-nur"
|
||||
template:
|
||||
- "%{result} - %{branch} \"%{commit_subject}\" %{build_url}"
|
||||
|
||||
jobs:
|
||||
include:
|
||||
- name: test pull request
|
||||
script: bash ci/test.sh
|
||||
if: type = pull_request
|
||||
|
||||
- name: update nur / nur-combined
|
||||
script: bash ci/update-nur.sh
|
||||
if: branch = master AND type != pull_request
|
||||
|
||||
- name: update nur-search/data/packages.json
|
||||
script: ci/update-nur-search.sh
|
||||
if: branch = master AND type != pull_request
|
||||
|
|
@ -1,24 +1,5 @@
|
|||
# only source this file
|
||||
# to setup git to push and pull repositories via ssh
|
||||
# ==================================================
|
||||
|
||||
# set up git and ssh
|
||||
# ------------------
|
||||
keys_dir=$(mktemp -d)
|
||||
openssl aes-256-cbc \
|
||||
-K $encrypted_080f214a372c_key \
|
||||
-iv $encrypted_080f214a372c_iv \
|
||||
-in ci/keys.tar.gz.enc -out ci/keys.tar.gz -d
|
||||
tar -C "$keys_dir" -xzvf ci/keys.tar.gz
|
||||
eval "$(ssh-agent -s)"
|
||||
chmod 600 "${keys_dir}/ssh-key"
|
||||
ssh-add "${keys_dir}/ssh-key"
|
||||
gpg --import "${keys_dir}/gpg-private-key"
|
||||
rm -rf "$keys_dir"
|
||||
|
||||
export encrypted_080f214a372c_key= encrypted_080f214a372c_iv=
|
||||
|
||||
git config --global user.name "Nur a bot"
|
||||
git config --global user.email "joerg.nur-bot@thalheim.io"
|
||||
git config --global user.signingkey "B4E40EEC9053254E"
|
||||
git config --global commit.gpgsign true
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
#!/usr/bin/env bash
|
||||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -p bash -i bash -p python3Packages.mypy -p python3Packages.black -p python3Packages.flake8
|
||||
|
||||
set -eux -o pipefail # Exit with nonzero exit code if anything fails
|
||||
|
||||
|
|
@ -11,11 +12,11 @@ if [ -n "$(git diff --exit-code repos.json)" ]; then
|
|||
fi
|
||||
|
||||
# Type checker
|
||||
nix run nixpkgs.python3Packages.mypy -c mypy nur
|
||||
mypy nur
|
||||
# Format checker
|
||||
nix run nixpkgs.python3Packages.black -c black --check .
|
||||
black --check .
|
||||
# Linter
|
||||
nix run nixpkgs.python3Packages.flake8 -c flake8 .
|
||||
flake8 .
|
||||
|
||||
nix run '(import ./release.nix {})' -c nur update
|
||||
nix-build
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
#!/usr/bin/env bash
|
||||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -p git -p bash -i bash
|
||||
|
||||
set -eu -o pipefail # Exit with nonzero exit code if anything fails
|
||||
|
||||
|
|
@ -13,7 +14,10 @@ set -x
|
|||
|
||||
nix-build --quiet release.nix
|
||||
|
||||
git clone --recurse-submodules git@github.com:nix-community/nur-search
|
||||
git clone \
|
||||
--recurse-submodules \
|
||||
--single-branch \
|
||||
"https://$API_TOKEN_GITHUB@github.com/nix-community/nur-combined.git"
|
||||
|
||||
git clone git@github.com:nix-community/nur-combined
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
#!/usr/bin/env bash
|
||||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -p git -p bash -i bash
|
||||
|
||||
set -eu -o pipefail # Exit with nonzero exit code if anything fails
|
||||
|
||||
|
|
@ -10,7 +11,9 @@ set -x
|
|||
nix run '(import ./release.nix {})' -c nur update
|
||||
nix-build
|
||||
|
||||
git clone git@github.com:nix-community/nur-combined
|
||||
git clone \
|
||||
--single-branch \
|
||||
"https://$API_TOKEN_GITHUB@github.com/nix-community/nur-combined.git"
|
||||
|
||||
nix run '(import ./release.nix {})' -c nur combine \
|
||||
--irc-notify nur-bot@chat.freenode.net:6697/nixos-nur \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue